-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
30 lines (29 loc) · 875 Bytes
/
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
// Here we extend the vue-cli webpack config
const PurgecssPlugin = require('purgecss-webpack-plugin')
const glob = require('glob-all')
const path = require('path')
module.exports = {
// Relative publicPath on prod, Absolute for Dev
publicPath: process.env.NODE_ENV === 'production' ? '/fireball/' : '/',
// Auto injection of SCSS vars into template <style> section
css: {
loaderOptions: {
sass: {
data: `@import "@/styles/variables.scss";`,
},
},
},
// Provide purify with the scope of what to strip styles against
configureWebpack: {
// Merged into the final Webpack config
plugins: [
new PurgecssPlugin({
paths: glob.sync([
path.join(__dirname, './src/index.html'),
path.join(__dirname, './**/*.vue'),
path.join(__dirname, './src/**/*.js'),
]),
}),
],
},
}