Skip to content

Document webpack change: feat: support webpackIgnore for new URL() construction #7355

@webpack-bot

Description

@webpack-bot

A pull request by @alexander-akait was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#18677


What kind of change does this PR introduce?

Feature:

new URL(/* webpackIgnore: true */ "file1.css", import.meta.url)

Because we support import(/* webpackIgnore: true */ "./file.css"); we need support for this in new URL() too, otherwise it is imposible to migrate on new URL from import(...); (what we actually recommend).

Also import.meta.url is not keeping as is, it will be replaced on baseURI in such case (for modules it is new URL("./", import.meta.url), for other cases it is document.baseURI), so relative URLs will work correctly.

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?

Need improve our docs about this feature

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions