-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default to output native modules. Add outputSystemJS option. (#412)
* Default to output native modules. Add outputSystemJS option. * Improve changeset
- Loading branch information
1 parent
60a7358
commit f9edeef
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
"webpack-config-single-spa": major | ||
--- | ||
|
||
Output to native ES modules by default. Add new outputSystemJS option. | ||
|
||
## Upgrading | ||
|
||
To upgrade without switching to native ES modules, add the `outputSystemJS` option to your webpack.config.js: | ||
|
||
```js | ||
const { merge } = require("webpack-merge"); | ||
const singleSpaDefaults = require("webpack-config-single-spa"); | ||
|
||
module.exports = (webpackConfigEnv, argv) => { | ||
const defaultConfig = singleSpaDefaults({ | ||
orgName: "org", | ||
projectName: "project", | ||
webpackConfigEnv, | ||
argv, | ||
|
||
// This is the new option that preserves backwards compatibility | ||
outputSystemJS: true, | ||
}); | ||
|
||
return merge(defaultConfig, { | ||
// modify the webpack config however you'd like to by adding to this object | ||
}); | ||
}; | ||
``` | ||
|
||
To switch to native ES modules, see the full migration guide on single-spa.js.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.