-
Notifications
You must be signed in to change notification settings - Fork 88
/
webpack.config.js
37 lines (36 loc) · 1.01 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
const path = require('path');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const RtlCssPlugin = require("rtlcss-webpack-plugin");
const CompressionPlugin = require("compression-webpack-plugin");
module.exports = {
plugins: [
new MiniCssExtractPlugin(),
new RtlCssPlugin('main.rtl.css'),
new CompressionPlugin({
algorithm: 'gzip',
filename: '[path][base].gz',
test: /\.js$|\.css$|\.html$|\.svg$|\.eot$|\.woff$|\.woff2$|\.ttf$|\.txt$/,
threshold: 10240,
minRatio: 0.8
}),
],
entry: {
'main': __dirname + "/src/bundle.js",
},
output: {
path: path.resolve(__dirname, 'assets/build'),
clean: true,
},
module: {
rules: [
{
test: /\.scss$/i,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"sass-loader",
],
},
],
}
};