Initial commit
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
/* 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: '/',
|
||||
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: {
|
||||
headers: { 'Access-Control-Allow-Origin': '*' },
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'localhost:8080/',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': ''
|
||||
}
|
||||
},
|
||||
// '/api': {
|
||||
// // target: 'https://qcwss.cloud.tencent.com/domain/ajax',
|
||||
// target: interfaceUrl,
|
||||
// ws: true,
|
||||
// changeOrigin: true,
|
||||
// pathRewrite: {
|
||||
// '^/api': '', // rewrite path
|
||||
// },
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user