-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.app.config.js
48 lines (46 loc) · 1.05 KB
/
webpack.app.config.js
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: './app/index',
output: {
path: path.resolve(__dirname, 'public'),
publicPath: '/',
filename: 'bundle.js',
},
module: {
loaders: [{
test: /\.js$/,
loaders: ['babel'],
exclude: /node_modules/,
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css?modules&importLoaders=1&localIdentName=[local]__[path][name]__[hash:base64:5]!postcss-loader'),
}, {
test: /\.jpeg$/,
loader: 'file-loader',
}]
},
plugins: [
new HtmlWebpackPlugin({
template: './app/index.html',
}),
new ExtractTextPlugin('style.css', {
allChunks: true,
})
],
resolve: {
modules: [
'node_modules',
'app',
],
extensions: ['', '.js', '.css'],
},
postcss: function () {
return [
];
},
devtool: 'eval',
target: 'web'
};