-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwebpack.config.js
More file actions
26 lines (25 loc) · 801 Bytes
/
webpack.config.js
File metadata and controls
26 lines (25 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: {
main: path.resolve(__dirname, 'client', 'src', 'main.js')
},
output: {
path: path.resolve(__dirname, 'client', 'build'),
filename: '[name].js'
},
module: {
loaders: [
{test: /\.js$/, include: /src/, exclude: /node_modules/, loader: 'babel', query: {presets: ['es2015', 'stage-0']}},
{test: /\.css$/, loader: ExtractTextPlugin.extract('style', 'css!postcss')},
{test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url'},
{test: /\.json$/, loader: 'json'}
]
},
node: {
fs: "empty",
},
plugins: [
new ExtractTextPlugin('styles.css')
]
};