-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
43 lines (41 loc) · 860 Bytes
/
webpack.config.js
File metadata and controls
43 lines (41 loc) · 860 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
36
37
38
39
40
41
42
43
var webpack = require("webpack");
var path = require("path");
var CompressionPlugin = require('compression-webpack-plugin');
var OUT_DIR = path.join(__dirname,"public");
module.exports = {
entry: {
ide: ['./src/milo.js'],
},
output: {
path: OUT_DIR,
filename: '[name].js',
},
module: {
rules: [
{
test: /\.js$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader',
}
}
]
},
resolve: {
extensions: ['.js'],
},
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
'Blockly':'milo-blocks'
}),
new webpack.optimize.AggressiveMergingPlugin(),
new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.js$|\.css$|\.html$/,
threshold: 10240,
minRatio: 0.8
})
],
};