-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
34 lines (33 loc) · 1.02 KB
/
webpack.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
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
entry: {
app: ['./index.js']
},
devtool: 'cheap-module-source-map',
output: {
path: __dirname + '/static',
filename: 'index.[hash].js',
publicPath: '/'
},
module: {
loaders: [
{ test: /\.css$/, use: ['style-loader', 'css-loader'] },
{ test: /\.s[ac]ss$/, use: ['style-loader', 'css-loader', 'sass-loader'] },
{ test: /\.js$/, use: ['babel-loader'], exclude: /node_modules/ },
]
},
resolve: {
extensions: ['.js', '.jsx', '.scss', '.css', '.json']
},
plugins: [
new webpack.IgnorePlugin(/.js.map$/),
new HtmlWebpackPlugin({
template: 'index.html',
}),
new CleanWebpackPlugin('static/**'),
new CopyWebpackPlugin(['roms/**'])
]
};