Skip to content

Duplicate loaders for .css #1231

@clarkdo

Description

@clarkdo

Version

15.0.0-rc.1

Reproduction link

https://github.com/nuxt/nuxt.js/tree/dev/examples/async-component-injection

Steps to reproduce

Use <style src=""> to import css.

<template>
  <div> </div>
</template>

<script>
export default {
}
</script>

<style src="@/assets/css/index.css"/>

What is expected?

CSS can ben loaded by css-loader, vue-style-loader successfully.

What is actually happening?

Error:

Module build failed: Syntax Error
(5:1) Unknown word


According to my investigation, 5a9ee91 introduced this issue.

<style src="@/assets/css/index.css"/> will be applied to both rawLoaders(vue-style-loader, css-loader) and also cloned rules from vue-loader.

test and resourceQuery in VueLoaderPlugin can also be passed for this kind of css file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions