Subpath #2375
Unanswered
imranjeetsingh
asked this question in
Q&A
Subpath
#2375
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, i am using create react app with this webpack config
const { ModuleFederationPlugin } = require('webpack').container;
const webpackConfigPath = 'react-scripts/config/webpack.config';
const webpackConfig = require(webpackConfigPath);
const override = (config) => {
config.plugins.push(
new ModuleFederationPlugin(require('../../modulefederation.config.js'))
);
config.output.publicPath = 'auto';
return config;
};
require.cache[require.resolve(webpackConfigPath)].exports = (env) =>
override(webpackConfig(env));
module.exports = require(webpackConfigPath);
if i want to use config.output.publicPath= '/onboarding' ,app is breaking and not loading anything.
I have one conatiner and other two app. I want to deploy these on same server but in different route.
My conatiner will be hosted at https://abc.com and other two at https://abc.com/first and https://abc.com/second. I want https://abc.com to consume from https://abc.com/first and https://abc.com/second. But once i change public path it is not working as expected.
Also direct loading for url like https://abc.com/first/123 is not working once i change config.output.publicPath = '/onboarding'.
pls suggest the changes to be done
Beta Was this translation helpful? Give feedback.
All reactions