[add] init
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
/* 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: 8092,
|
||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||
proxy: {
|
||||
'/laws-chery': {
|
||||
target: 'http://10.0.10.87:8188',
|
||||
ws: false,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
// '/laws-chery': '' // 默认所有请求都加了jero-boot前缀,需要去掉
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user