Skip to content

Document webpack change: Disable compile time evaluation of import.meta.url #6087

Closed
@webpack-bot

Description

@webpack-bot

A pull request by @pavelsavara was merged and maintainers requested a documentation change.

See pull request: webpack/webpack#15246


Problem

Current webpack 5 evaluates import.meta.url to file://some/path/to/source of the build machine.

Fixes webpack/webpack#14445

Proposed changes

add new parser setting importMeta - enable/disable import.meta parsing

module.exports = {
  module: {
    parser: {
      javascript : { importMeta: false }
    }
  }
};

Does this PR introduce a breaking change?
No

What needs to be documented once your changes are merged?

New parser.javascript option importMeta - enable/disable import.meta parsing

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