56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
/* eslint-disable import/extensions */
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin')
|
|
|
|
const path = require('path')
|
|
|
|
const pageMethod = require('./utils/getPages.js')
|
|
|
|
const pages = pageMethod.pages()
|
|
const configs = pageMethod.configs()
|
|
|
|
// const { interfaceUrl } = require('./src/config')
|
|
function resolve (dir) {
|
|
return path.join(__dirname, dir)
|
|
}
|
|
|
|
module.exports = {
|
|
pages,
|
|
// publicPath: '/onlyofficeplugins/',
|
|
outputDir: 'onlyofficeplugins', //设置打包后的项目目录名称
|
|
configureWebpack: {
|
|
plugins: [
|
|
new CopyWebpackPlugin(configs)
|
|
]
|
|
},
|
|
css: {
|
|
loaderOptions: {
|
|
less: {
|
|
javascriptEnabled: true, // old solution
|
|
// HERE is the difference!
|
|
lessOptions: {
|
|
javascriptEnabled: true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
chainWebpack: (config) => {
|
|
config.resolve.alias
|
|
.set('@', resolve('./src'))
|
|
.set('@/common', resolve('@/common'))
|
|
},
|
|
devServer: {
|
|
port: 8082,
|
|
headers: { 'Access-Control-Allow-Origin': '*' },
|
|
proxy: {
|
|
'/laws-sinotruk': {
|
|
target: 'http://10.0.1.19:8184',
|
|
ws: false,
|
|
changeOrigin: true,
|
|
pathRewrite: {
|
|
// '/laws-sinotruk': '' // 默认所有请求都加了jero-boot前缀,需要去掉
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|