forked from PrestaShop/CsaGuzzleBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.babel.js
48 lines (46 loc) · 1.37 KB
/
webpack.config.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
46
47
48
import UglifyJsPlugin from 'uglifyjs-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin';
import path from 'path';
const config = {
entry: [
'./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.js',
'./node_modules/prismjs/themes/prism-okaidia.css',
'./assets-src/js/accordion.js',
'./assets-src/js/prism.js',
'./assets-src/sass/main.sass'
],
optimization: {
minimizer: [
new UglifyJsPlugin({
cache: true,
parallel: true,
sourceMap: true // set to true if you want JS source maps
}),
new OptimizeCSSAssetsPlugin({})
]
},
output: {
path: path.resolve(__dirname, 'src/Resources/views/js'),
filename: 'guzzle.min.js'
},
mode: 'production',
plugins: [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: '../css/screen.min.css'
})
],
module: {
rules: [{
test: /\.s?[ac]ss$/,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'sass-loader'
]
}]
}
}
export default config;