https://github.com/olsonpm/rollup-reexport-default-conflict
https://github.com/olsonpm/rollup-reexport-default-conflict
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/olsonpm/rollup-reexport-default-conflict
- Owner: olsonpm
- Created: 2017-01-23T03:33:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-23T03:41:11.000Z (over 9 years ago)
- Last Synced: 2025-01-20T23:45:41.149Z (over 1 year ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## example of re-export bug
run `npm i && npm run rollup`
to display the following
*note the erroneous "Conflicting namespaces" message*
```sh
> rollup-reexport-default-conflict@1.0.0 rollup /home/phil/git-repos/personal/rollup-reexport-default-conflict
> ./node_modules/rollup/bin/rollup --format es index.js
⚠️ Conflicting namespaces: dep1.js re-exports 'default' from both dep2.js (will be ignored) and dep3.js
const namedDep2 = 'this is namedDep2';
const namedDep3 = 'this is namedDep3';
var dep1 = Object.freeze({
namedDep2: namedDep2,
namedDep3: namedDep3
});
global.keepDep1Alive = dep1;
```
as for the js files
```js
// index.js
import * as dep1 from './dep1';
global.keepDep1Alive = dep1;
// dep1.js
export * from './dep2';
export * from './dep3';
// dep2.js
export default 'this is dep2';
const namedDep2 = 'this is namedDep2';
export { namedDep2 } ;
// dep3.js
export default 'this is dep3';
const namedDep3 = 'this is namedDep3';
export { namedDep3 } ;
```