-
Notifications
You must be signed in to change notification settings - Fork 5
/
webpack.config.js
44 lines (39 loc) · 1.04 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
35
36
37
38
39
40
41
42
43
//
// uglifyjsplugin still has issues with es6 code. 12/11/2017
const path = require('path');
//
//const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const MinifyPlugin = require("babel-minify-webpack-plugin");
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const config = {
mode: 'production',
entry: {
wings3d: ["./html/wings3d.bundle.js", './html/styles.css']
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].bundle.js', // The filename template
},
devtool: false,
module: {
rules: [
//{ test: /\.js$/,
// include: path.resolve(__dirname, 'js'),
//},
//{ test: /\.txt$/, use: 'raw-loader' },
{ test: /\.(png|jpg)$/, loader: 'url-loader'},
{ test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [{loader:'css-loader'}]
})
},
]
},
plugins: [
//new UglifyJsPlugin(),
//new MinifyPlugin(),
new ExtractTextPlugin("styles.css"),
]
};
module.exports = config;