2024-01-12 00:13:58 -05:00
|
|
|
const CracoLessPlugin = require('craco-less');
|
2024-03-05 23:40:37 -05:00
|
|
|
const HtmlWebpackPlugin=require('html-webpack-plugin')
|
|
|
|
const path = require('path');
|
2024-01-12 00:13:58 -05:00
|
|
|
module.exports = {
|
|
|
|
plugins: [
|
|
|
|
{
|
|
|
|
plugin: CracoLessPlugin,
|
|
|
|
options: {
|
|
|
|
lessLoaderOptions: {
|
|
|
|
lessOptions: {
|
|
|
|
modifyVars: { '@primary-color': '#800080' },
|
|
|
|
javascriptEnabled: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2024-03-05 23:40:37 -05:00
|
|
|
webpack: {
|
|
|
|
configure: (webpackConfig, { env, paths }) => {
|
|
|
|
// 修改output.publicPath为'./'
|
|
|
|
// webpackConfig.output.publicPath = './';
|
|
|
|
webpackConfig.output.path = path.join(__dirname,);
|
2024-03-08 04:54:39 -05:00
|
|
|
webpackConfig.output.publicPath = "";
|
2024-03-05 23:40:37 -05:00
|
|
|
return webpackConfig;
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
};
|