forked from codacy-badger/storefront
-
Notifications
You must be signed in to change notification settings - Fork 4
/
vue.config.js
64 lines (60 loc) · 1.45 KB
/
vue.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
module.exports = {
configureWebpack: {
resolve: {
alias: require('./aliases.config').webpack
},
optimization: {
minimizer: [new OptimizeCSSAssetsPlugin({})]
},
module: {
rules: [
{
resourceQuery: /blockType=i18n/,
type: 'javascript/auto',
loader: '@kazupon/vue-i18n-loader'
},
{
test: /\.(sa|sc|c)ss$/,
include: [
path.resolve(__dirname, 'src/assets/sass/sections')
],
use: [
{
loader: MiniCssExtractPlugin.loader
},
'css-loader',
'sass-loader'
]
}
]
},
plugins: [
// new BundleAnalyzerPlugin(),
new MiniCssExtractPlugin({
filename: '[name].css'
})
]
},
chainWebpack: config => {
config
.entry('ptah_sections')
.add('./src/assets/sass/sections/sections.sass')
.end()
},
pluginOptions: {
'style-resources-loader': {
preProcessor: 'sass',
patterns: [path.resolve(__dirname, 'src/assets/sass/_colors.sass')]
}
},
css: {
extract: false
},
transpileDependencies: [
'vue-update-message'
]
}