-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
26 lines (25 loc) · 948 Bytes
/
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
const path = require('path');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const HTMLWebpackPluginConfig = new HTMLWebpackPlugin({
template: './src/index.html',
filename: 'index.html',
inject: 'body'
})
module.exports = {
entry: ['babel-polyfill', './src/js/index.jsx'],
output: {
path: path.resolve('dist'),
filename: 'index_bundle.js'
},
module: {
loaders: [
{ test: /\.js$/, loaders: ['babel-loader', 'eslint-loader'], exclude: /node_modules/ },
{ test: /\.jsx$/, loaders: ['babel-loader', 'eslint-loader'], exclude: /node_modules/ },
//{ test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ },
//{ test: /\.jsx$/, loaders: ['babel-loader'], exclude: /node_modules/ },
{ test: /\.scss$/, loaders: ['style-loader', 'css-loader', 'sass-loader'] },
{ test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192' },
]
},
plugins: [HTMLWebpackPluginConfig],
}