next.js
4ada3146 - Add auto-commonjs and update swc (#30661)

Commit
4 years ago
Add auto-commonjs and update swc (#30661) Closes #30596 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint` - This patch contains several patches from swc. This includes https://github.com/swc-project/swc/pull/2581, which allows customizing the import path for regenerator. - This adds auto-detection of common js. If `module.exports` is found and module config is not set, module config becomes common js. - As bonus, this includes some performance improvements The logic for analyzing the input source file and parsing options as json is moved from the js thread to a background worker thread.
Author
Parents
Loading