1
0
mirror of synced 2025-11-06 11:20:40 +08:00
Files
vxe-table/vue.config.js
xuliangzhan bfce9c2201 update
2019-04-24 23:43:20 +08:00

50 lines
1.1 KiB
JavaScript

const path = require('path')
function resolve (dir) {
return path.join(__dirname, '.', dir)
}
module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? '/vxe-table/' : '/',
outputDir: 'docs',
assetsDir: 'static',
productionSourceMap: false,
configureWebpack: {
performance: {
hints: false
}
},
pages: {
index: {
entry: 'examples/main.js',
template: 'public/index.html',
filename: 'index.html',
title: 'vue table.'
}
},
chainWebpack (config) {
config.resolve.alias
.set('@', resolve('examples'))
config.output
.set('libraryExport', 'default')
.set('library', 'VXETable')
if (process.env.npm_lifecycle_event.indexOf('lib') === 0) {
let XEUtils = {
root: 'XEUtils',
commonjs: 'xe-utils',
commonjs2: 'xe-utils',
amd: 'xe-utils'
}
if (config.has('externals')) {
config.externals
.set('xe-utils', XEUtils)
} else {
config
.set('externals', {
'xe-utils': XEUtils
})
}
}
}
}