assistant-note/craco.config.js

33 lines
763 B
JavaScript
Raw Normal View History

2024-01-12 00:13:58 -05:00
const CracoLessPlugin = require('craco-less');
2024-09-24 06:53:53 -04: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,
},
},
},
},
],
webpack: {
configure: (webpackConfig, { env, paths }) => {
// 修改output.publicPath为'./'
// webpackConfig.output.publicPath = './';
2024-09-24 06:53:53 -04:00
webpackConfig.output.path = path.join(__dirname,);
webpackConfig.output.publicPath = "";
return webpackConfig;
},
2024-09-24 06:53:53 -04:00
},
devServer: {
port: 3005, // 设置端口
},
};