Skip to content

Commit 6c4f5df

Browse files
committed
Adding the webpack.config transpired from ES6
1 parent a6d92f0 commit 6c4f5df

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

config/dev-config.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Import Dependencies
2+
import Path from 'path'
3+
import Webpack from 'webpack'
4+
5+
// Export the dev configuration
6+
export default {
7+
context: Path.resolve('./src'),
8+
entry: {
9+
index: './app'
10+
},
11+
12+
module: {
13+
loaders: [
14+
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' },
15+
{ test: /\.scss$/, loader: 'style!css!sass' }
16+
]
17+
},
18+
19+
sassLoader: {
20+
includePaths: [
21+
Path.resolve('./src')
22+
]
23+
},
24+
25+
resolve: {
26+
root: Path.resolve('./node_modules'),
27+
extensions: [ '.js', '.scss', '' ],
28+
alias: {
29+
Components: Path.resolve('./src/components'),
30+
Utilities: Path.resolve('./src/utilities')
31+
}
32+
},
33+
34+
resolveLoader: {
35+
root: Path.resolve('./node_modules')
36+
},
37+
38+
devServer: {
39+
port: 8080,
40+
inline: true,
41+
compress: true,
42+
contentBase: 'dist/'
43+
},
44+
45+
output: {
46+
path: '/dist/build',
47+
publicPath: '/build/',
48+
filename: '[name].bundle.js'
49+
}
50+
}

webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Use Babel to transpile all future requires
2+
require('babel-register');
3+
4+
// Transpile and export the dev configuration
5+
module.exports = require('./config/dev-config.js').default;

0 commit comments

Comments
 (0)