-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.babel.js
36 lines (33 loc) · 1023 Bytes
/
webpack.prod.babel.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
import path from 'path';
import merge from 'webpack-merge';
import webpack from 'webpack';
import CleanWebpackPlugin from 'clean-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import pkgInfo from 'pkginfo';
import common from './webpack.common.babel';
pkgInfo(module);
export default merge(common, {
mode: 'production',
output: {
filename: `scripts/${module.exports.name}/js/[name].[hash].js`,
path: path.resolve(__dirname, 'dist/web_root'),
publicPath: 'https://ps.irondistrict.org/'
},
module: {
rules: [{
test: /\.(css|scss|sass)$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'sass-loader'
]
}],
},
plugins: [
// new CleanWebpackPlugin(['./dist/*']),
new MiniCssExtractPlugin({
filename: `scripts/${module.exports.name}/css/[name].[hash].css`
}),
new webpack.NamedModulesPlugin()
]
})