Open TaoistYG opened 1 year ago
If you want to only generate only your own custom folder without generating /build folder as default, then you only need to adjust this line of code : paths.appBuild = webpackConfig.output.path;
Details as below:
const webpackConfig = {
webpack: {
alias: {
"@": addPath("src"),
},
configure: (webpackConfig, { env, paths }) => {
webpackConfig.output = {
...webpackConfig.output,
path: path.resolve(__dirname, './dist/'),
publicPath: '/',
}
paths.appBuild = webpackConfig.output.path;
return webpackConfig;
}
},
babel: {
plugins: [
// ['import', { libraryName: 'antd', style: true}],
]
}
}
module.exports = webpackConfig;
What's happening Hello, When I use craco to change the package file name and static resource directory,The packaging generates not only the original default build file, but also my own custom folder,The default build file is a file directory after deployment, and dist is a normal file
What should happen I want to package to generate only custom folders and directories
To reproduce npm i @craco/craco -D npm run build
CRACO version (ex. 7.1.0)
CRACO config
package.json
Additional information I think it may be a problem between react- Script 5.x and Craco 7.x