2025-02-07 16:55:28 +00:00
|
|
|
const path = require('path')
|
|
|
|
function resolve (dir) {
|
|
|
|
return path.join(__dirname, dir)
|
|
|
|
}
|
|
|
|
module.exports = {
|
|
|
|
lintOnSave: false,
|
|
|
|
devServer: {
|
|
|
|
open: true,
|
|
|
|
openPage: '',
|
|
|
|
host: '0.0.0.0',
|
2025-05-10 15:02:19 +00:00
|
|
|
port: 8080,
|
2025-02-07 16:55:28 +00:00
|
|
|
https: false,
|
|
|
|
proxy: null, // 设置代理
|
|
|
|
before: app => {}
|
|
|
|
},
|
|
|
|
css: {
|
|
|
|
loaderOptions: {
|
|
|
|
sass: {
|
|
|
|
// 添加这个配置来支持 @import
|
|
|
|
sassOptions: {
|
|
|
|
quietDeps: true
|
|
|
|
},
|
|
|
|
// 使用新的 API
|
|
|
|
implementation: require('sass')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
chainWebpack: config => {
|
|
|
|
config.resolve.alias
|
|
|
|
.set('@', resolve('src'))
|
|
|
|
.set('@a', resolve('src/assets'))
|
|
|
|
.set('@c', resolve('src/components'))
|
|
|
|
// 优化大文件处理
|
|
|
|
config.performance
|
|
|
|
.maxEntrypointSize(1024000)
|
|
|
|
.maxAssetSize(1024000)
|
|
|
|
},
|
|
|
|
configureWebpack: {
|
|
|
|
optimization: {
|
|
|
|
splitChunks: {
|
|
|
|
chunks: 'all',
|
|
|
|
maxSize: 250000
|
|
|
|
}
|
|
|
|
}
|
2025-02-15 19:58:23 +00:00
|
|
|
},
|
|
|
|
transpileDependencies: ['@eyevinn/webrtc-player']
|
2025-02-07 16:55:28 +00:00
|
|
|
}
|