webpack: If both `providedExports` and `concatenateModules` are enabled, ES6 default import becomes `undefined`
Bug report
What is the current behavior?
If both providedExports and concatenateModules are enabled, ES6 default import becomes undefined.
// @SBrython/utils/generate.ts
console.warn("first");
export default function generate(code: string, results: Results) {
// ...
}
console.warn("second", generate);
// import.ts
import generate from "@SBrython/utils/generate";
console.warn("here", generate);
Result:
first
second function 7861(t, n)
here undefined
If the current behavior is a bug, please provide the steps to reproduce.
This is a big project I recently tried to build in production mode. Here the last version: https://github.com/denis-migdal/SimplerBrython/tree/cab862810b787fc088a3705389bb74bfa07e817c
What is the expected behavior?
The imported function should be properly imported, and not be undefined.
Other relevant information: webpack version: 5.98.0 Node.js version: v22.5.1 Operating System: Linux Additional tools: “circular-dependency-plugin” : no circular dependencies found.
Maybe related to ?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (6 by maintainers)
git clone --recurse-submodules https://github.com/denis-migdal/SimplerBrython.gitcd SimplerBrythonnpm install/build/WebpackFramework/src/skeleton.jsnpm run build-prod/dist/prod, e.g.python3 -m http.server -d dist/prod/http://127.0.0.1:8000/Benchmark/Tested with
ts-loadersame issue.