create wrapper with npx create-single-spa --moduleType root-config
create wrapped with npx create-single-spa --moduleType app-parcel
wrapped components will easiest to deploy on subpaths. Get webpack to build them in sub-directories like this:
// webpack.config.js return merge(defaultConfig, { ... output: { path: path.resolve('./dist/serve/<subpath>'), publicPath: '/serve/<subpath>/', } ... });
We are prepending the /serve path to avoid path conflicts with the production routes.