canopy-sofe-extensions
canopy-sofe-extensions is an npm package that is part of canopy common dependencies. It does two things:
- Provides special sofe overrides of
integ
,stage
,prod
, or simply a port number (for localhost) - Exports a function,
calculatePublicPath
, that helps you set the webpack public path for a sofe override correctly. Setting the public path correctly is required for doing code splitting in a sofe service.
Example usage
// In your webpack entry file __webpack_public_path__ =
If you need to call dynamic import()
immediately in a file that gets executed before the entry file, try the following
// In your webpack entry file
// In set-public-path.js __webpack_public_path__ =