feat:carco正常启动

This commit is contained in:
1708-huayu 2024-09-24 19:07:06 +08:00
parent 56418aeea4
commit 3b7d8f14c3
1 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,4 @@
const CracoLessPlugin = require('craco-less'); const CracoLessPlugin = require('craco-less');
const HtmlWebpackPlugin=require('html-webpack-plugin')
const path = require('path'); const path = require('path');
module.exports = { module.exports = {
plugins: [ plugins: [
@ -15,7 +14,14 @@ module.exports = {
}, },
}, },
], ],
alias: {
// 将@/*映射为src目录
'@': path.resolve(__dirname, 'src/'),
},
webpack: { webpack: {
alias:{
'@': path.resolve(__dirname, 'src/')
},
configure: (webpackConfig, { env, paths }) => { configure: (webpackConfig, { env, paths }) => {
// 修改output.publicPath为'./' // 修改output.publicPath为'./'
// webpackConfig.output.publicPath = './'; // webpackConfig.output.publicPath = './';