目前,有3个使用select(df, !!paste0('Peter_', target))
创建的独立React应用。我需要将它们放在一个文件夹中。当我执行create-react-app
时,效果很好。问题是如何使用npm run build
要配置Webpack而不弹出,请使用npm run dev:second-app
软件包。这是代码:
react-app-rewired
config-overrides.js
const path = require('path');
module.exports = function override(config, env) {
config.entry = {
firstApp: "./src/firstApp/index.js",
secondApp: "./src/secondApp/index.js",
thirdApp: "./src/thirdApp/index.js"
}
config.optimization.runtimeChunk = false;
config.optimization.splitChunks.name = 'shared';
config.output = {
path: path.resolve(__dirname, 'shopify'),
publicPath: '/',
filename: 'assets/[name].main.js',
chunkFilename: 'assets/[name].chunk.js'
}
return config;
};
package.json