Skip to content

Script imports in preprocessor templates are resolved relative to the including file #111

@gingershaped

Description

@gingershaped

Current behaviour

In templates which are included in another file (such as by using Handlebars partials), <script> tags in the template will have their src paths resolved relative to the file which included them.

Expected behaviour

The src should be resolved relative to the template file itself.

Reproduction

https://github.com/gingershaped/template-script-import-mre

Environment

  • OS: Windows
  • version of Node.js: 20.16.0
  • version of Webpack: 5.1.4
  • version of the Plugin: 4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions