-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Description
Bug report
What is the current behavior?
There is a syntax error in the export statement in the file generated after packaging
// EXTERNAL MODULE: ./node_modules/.pnpm/@koa+cors@5.0.0/node_modules/@koa/cors/index.js
var cors = __webpack_require__(5374);
var cors_default = /*#__PURE__*/__webpack_require__.n(cors);
;// ./entry.ts
export { koa as Koa, (cors_default()) as KoaCors };
(cors_default()) as KoaCors has SyntaxError
If the current behavior is a bug, please provide the steps to reproduce.
https://github.com/ShenHongFei/webpack-bug
What is the expected behavior?
There are no syntax errors in the generated files after packaging
// EXTERNAL MODULE: ./node_modules/.pnpm/@koa+cors@5.0.0/node_modules/@koa/cors/index.js
var cors = __webpack_require__(5374);
;// ./entry.js
export { koa as Koa, cors as KoaCors };
Other relevant information:
webpack version: v5.99.5 (latest)
Node.js version: v24.0.0 (latest main branch)
Operating System: windows 11 latest
Additional tools: ts-loader (latest ^9.5.2)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels