-
When I build my app in production mode, then I get :
However, everything is fine in development mode. This is in the context of a CRA app migration. Configuration : // ...
export default defineConfig(({ env, command, envMode }) => {
return ({
html: {
template({ entryName }) {
const templates = {
index: './public/index.html',
callWindow: './public/callWindow.html',
};
return templates[entryName] || './public/index.html';
},
},
dev: {
assetPrefix: 'auto',
},
output: {
assetPrefix: 'auto',
distPath: {
root: 'build',
},
sourceMap: {
js: 'source-map',
},
},
plugins: [pluginReact(), pluginTypeCheck({ enable: false }), pluginSvgr({ mixedImport: true })],
source: {
define: {
'process.platform': platform,
'process.env': {
...publicVars,
},
},
entry: {
index: [path.resolve(__dirname, './src/index.tsx')],
callWindow: [path.resolve(__dirname, './src/callWindow/index.tsx')],
}
}})
}); |
Beta Was this translation helpful? Give feedback.
Answered by
Romej
Aug 9, 2024
Replies: 1 comment 2 replies
-
@Romej Can you provide a minimal reproducible demo? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is no longer a problem in v1