-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.babel.js
45 lines (42 loc) · 1.19 KB
/
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
37
38
39
40
41
42
43
44
45
import path from 'path'
import webpack from 'webpack'
import merge from 'webpack-merge'
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',
// devtool: 'source-map',
output: {
path: path.resolve(__dirname, 'dist/web_root'),
filename: `scripts/${module.exports.name}/js/[name].js`,
publicPath: 'https://ps.irondistrict.org',
library: 'hearingTest',
libraryTarget: 'amd'
},
module: {
rules: [
{
test: /\.(sc|c)ss$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
options: {
includePaths: [
path.resolve(__dirname, 'node_modules/')
]
}
},
'css-loader',
'sass-loader'
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
filename: `scripts/${module.exports.name}/css/[name].css`
})
]
})