Skip to content

v15-beta fails when the vue-loader rule uses include #1201

@loilo

Description

@loilo

Version

15.0.0-beta.2

Reproduction link

https://github.com/Loilo/vue-loader-15-include-repro

Steps to reproduce

Clone the repository and install npm dependencies:

git clone https://github.com/Loilo/vue-loader-15-include-repro.git
cd vue-loader-15-include-repro
npm install

Run webpack:

npx webpack

What is expected?

The VueLoaderPlugin should initialize correctly.

What is actually happening?

The VueLoaderPlugin complains that "no matching rule for vue files are found".


I've dug into the source and found the cause: The check if a loader is matching foo.vue returns false if the rule has an include property. This is correct for webpack's own behaviour but probably undesirable for vue-loader.

A sufficient solution would probably be to (locally) remove the include property before normalizing rules. I'd be happy to attach a PR for this. I have attached a PR for this.

Metadata

Metadata

Assignees

No one assigned

    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