Skip to content

test: fix import attributes external target#18981

Merged
alexander-akait merged 1 commit intowebpack:mainfrom
fi3ework:attributes-test
Nov 15, 2024
Merged

test: fix import attributes external target#18981
alexander-akait merged 1 commit intowebpack:mainfrom
fi3ework:attributes-test

Conversation

@fi3ework
Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Previously, the bundled result of test/js/ConfigTestCases/externals/import-attributes/bundle0.mjs was incorrect as below. It should be ./pkg.json because ESM requires a fully specified path.

/***/ ((module) => {

module.exports = import("./pkg", { with: {"type":"json"} });;

/***/ }),

I'm not sure the reason it's not panicked in webpack test, as webpack test is simulating many stuff like the runtime. But it did panic in Rspack ported webpack test (they're not fully aligned). However, according to the output code, it should be fixed this way.

Did you add tests for your changes?

Yes.

Does this PR introduce a breaking change?

No.

What needs to be documented once your changes are merged?

No.

@webpack-bot
Copy link
Copy Markdown
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants