mirror of
https://github.com/tenrok/vue-ganttastic.git
synced 2026-05-17 03:09:36 +03:00
30 lines
579 B
JavaScript
30 lines
579 B
JavaScript
const isProduction = process.env.NODE_ENV === 'production'
|
|
const isBuildLib =
|
|
(process.env.npm_lifecycle_script || '').indexOf('--target lib') > 0
|
|
|
|
module.exports = {
|
|
publicPath: isProduction ? '/vue-ganttastic/' : '',
|
|
|
|
outputDir: isBuildLib ? 'dist' : 'demo',
|
|
|
|
css: {
|
|
loaderOptions: {
|
|
sass: {
|
|
implementation: require('sass')
|
|
}
|
|
},
|
|
extract: true
|
|
},
|
|
|
|
productionSourceMap: false,
|
|
|
|
chainWebpack: config => {
|
|
if (isBuildLib) {
|
|
config.externals({
|
|
...config.get('externals'),
|
|
moment: 'moment'
|
|
})
|
|
}
|
|
}
|
|
}
|