Commit c4e47ee
feat(commonjs)!: return the namespace by default when requiring ESM (rollup#507)
* feat(commonjs): require ESM namespace by default, allow configuration
BREAKING CHANGES: By default, require expressions will return the namespace of internal and external modules
* chore(commonjs): refactor and clean up code
* chore(commonjs): add documentation
* feat(commonjs): add esmExternals option
* fix(commonjs): handle requiring mixed ES modules
* chore(commonjs): adapt to updated dependencies1 parent 0b58d35 commit c4e47ee
File tree
129 files changed
+1748
-293
lines changed- packages
- alias
- auto-install
- test
- babel
- beep
- buble
- commonjs
- src
- test
- fixtures/function
- esm-externals-false
- esm-externals-function
- esm-externals-list
- esm-externals-true
- esm-externals-undefined
- export-default-from
- import-esm-require-returns-default-auto
- import-esm-require-returns-default-false
- import-esm-require-returns-default-function-called-once
- import-esm-require-returns-default-function-external
- import-esm-require-returns-default-function
- import-esm-require-returns-default-preferred
- import-esm-require-returns-default-true
- import-esm-require-returns-default-undefined
- require-esm-with-named-namespace
- require-esm-with-namespace-and-default
- require-esm-with-namespace-named-default
- require-esm-with-namespace-prefer-default
- transform-mixed-modules
- transpiled-esm-default
- transpiled-esm-mixed
- transpiled-esm-named
- transpiled-esm-namespace-default
- transpiled-esm-namespace-mixed
- transpiled-esm-namespace-named
- node_modules
- external-cjs-exports
- external-cjs-module-exports
- external-esm-default
- external-esm-mixed
- external-esm-named
- snapshots
- data-uri
- dsv
- dynamic-import-vars
- html
- image
- inject
- json
- legacy
- multi-entry
- node-resolve
- pluginutils
- replace
- run
- src
- strip
- sucrase
- typescript
- url
- virtual
- wasm
- yaml
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
129 files changed
+1748
-293
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
60 | 58 | | |
61 | 59 | | |
62 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments