Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

library: "module" renderStartup missing export #4784

Closed
ahabhgk opened this issue Nov 27, 2023 · 0 comments · Fixed by #4901
Closed

library: "module" renderStartup missing export #4784

ahabhgk opened this issue Nov 27, 2023 · 0 comments · Fixed by #4901
Assignees
Labels
A-artifacts Area: artifacts team The issue/pr is created by the member of Rspack.

Comments

@ahabhgk
Copy link
Collaborator

ahabhgk commented Nov 27, 2023

// index.js
export const a = 1;
export const b = 2;
// rspack.config.js
module.exports = {
  entry: "./index.js`,
  mode: "development",
  devtool: false,
  output: {
    library: { type: "module" },
  }
  experiments: {
    outputModule: true
  },
}

Rspack's startup:

var __webpack_exports__ = __webpack_require__("./index.js");

webpack's startup

var __webpack_exports__a = __webpack_exports__.a;
var __webpack_exports__b = __webpack_exports__.b;
export { __webpack_exports__a as a, __webpack_exports__b as b };
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 27, 2023
@ahabhgk ahabhgk added the A-artifacts Area: artifacts label Nov 27, 2023
@ahabhgk ahabhgk linked a pull request Dec 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-artifacts Area: artifacts team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants