-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Description
Hi!
Trying to exclude a module in vain.
Steps to reproduce
> ncc build main.js -e module1 -o .\dist\
Actual result
- The code from the excluded module is included in index.js
- The module object is removed
Example
main.js
import * as module1 from './module1.mjs';
let myVar = module1.myFunction();
module1.mjs
export function myFunction(){
return null;
}
index.js
function myFunction(){
return null;
}
let myVar = myFunction();
Expected results
- The code from the excluded module is not included in index.js
- The module object is left as is
Example
main.js
import * as module1 from './module1.mjs';
let myVar = module1.myFunction();
module1.mjs
export function myFunction(){
return null;
}
index.js
let myVar = module1.myFunction();
Notes:
- Code is nodejs with ES Module imports / exports
- Documentation is not clear as to how to declare module in the command line. I have tried to put the module name only, the module with the path, single quote, extension, etc...
- Debug option (-d) does not seem to work easier (nothing displayed)
- ncc version 0.38.3
- My modules are named with the .mjs extension
- I have also used JSDoc
@modulein the module header - Same result with the --external option
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels