1
0
mirror of synced 2025-12-07 22:28:34 +08:00
Files
vxe-table/vue.config.js
2024-06-13 18:18:25 +08:00

57 lines
1.1 KiB
JavaScript

const path = require('path')
const pkg = require('./package.json')
const { defineConfig } = require('@vue/cli-service')
function resolve (dir) {
return path.join(__dirname, '.', dir)
}
process.env.VUE_APP_VXE_VERSION = pkg.version
process.env.VUE_APP_VXE_ENV = 'development'
const externalMaps = {
'xe-utils': 'XEUtils',
'@vxe-ui/core': 'VxeUI'
}
const externals = {}
if (process.env.npm_lifecycle_event && process.env.npm_lifecycle_event.indexOf('lib') === 0) {
for (const key in externalMaps) {
const name = externalMaps[key]
const item = {
root: name,
commonjs: key,
commonjs2: key,
amd: key
}
externals[key] = item
}
}
module.exports = defineConfig({
transpileDependencies: true,
productionSourceMap: false,
pages: {
index: {
title: 'Vxe PC Table',
entry: 'examples/main.ts',
template: 'public/index.html',
filename: 'index.html'
}
},
configureWebpack: {
performance: {
hints: false
},
resolve: {
alias: {
'@': resolve('examples')
}
},
output: {
library: 'VXETable'
},
externals
}
})