-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
35 lines (32 loc) · 854 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
35 lines (32 loc) · 854 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
27
28
29
30
31
32
33
34
35
var path = require("path");
var app_dir = __dirname + '/client';
var HtmlWebpackPlugin = require('html-webpack-plugin');
var HTMLWebpackPluginConfig = new HtmlWebpackPlugin({
template: app_dir + '/index.html',
filename: 'index.html',
inject: 'body'
});
var config = {
entry: app_dir + '/app.js',
output: {
path: __dirname + '/dist',
filename: 'app.js'
},
module: {
rules: [{
test: /\.s?css$/,
use: [
'style-loader',
'css-loader',
'sass-loader'
]
}, {
test: /\.js$/,
loader: 'babel-loader',
exclude: /(node_modules|bower_components)/,
options: { babelrcRoots: ['.', '../'] }
}]
},
plugins: [HTMLWebpackPluginConfig]
};
module.exports = config;