-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
42 lines (41 loc) · 1.2 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
const path = require('path');
const webpack = require('webpack');
const AssetsPlugin = require('assets-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
module.exports = {
entry: {
app: path.resolve('./resources/src/app'),
vendor: path.resolve('./resources/src/vendor'),
documentation: path.resolve('./resources/src/docs'),
},
output: {
path: path.resolve(__dirname, 'public/dist'),
filename: '[name].[chunkhash].js',
},
optimization: {
minimize: true
},
module: {
rules: [
{
test: /\.(sa|sc|c)ss$/,
exclude: /node_modules/,
use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
},
]
},
resolve: {
extensions: ['.js', '.jsx']
},
plugins: [
new MiniCssExtractPlugin(),
new CssMinimizerPlugin(),
new AssetsPlugin({
filename: 'manifest.json',
path: path.resolve(__dirname, 'public/dist'),
prettyPrint: true,
removeFullPathAutoPrefix: true
})
],
};