Skip to content

style is not affective on vue demo #1152

@eminoda

Description

@eminoda
  • Operating System: window10
  • Node Version: v10.15.3
  • NPM Version: 6.4.1
  • webpack Version: 4.44.1
  • css-loader Version: 4.2.0

Expected Behavior

I use wepback make a simple vue demo, try to use scss-loader parse scss style, expect below picture

搜狗截图20年08月01日1631_2

Actual Behavior

but,now is this picture. You can css style is not become effective, because <style> attribute is not appear to html.
搜狗截图20年08月01日1630_1

Code

{
        test: /\.scss$/,
        use: [
          {
            loader: 'vue-style-loader',
            options: {
              // sourceMap: false,
              // shadowMode: false,
            },
          },
          {
            loader: 'css-loader',
            options: {
              // sourceMap: false,
              // importLoaders: 2,
              // modules: {
              //   localIdentName: '[name]_[local]_[hash:base64:5]',
              // },
            },
          },
          {
            loader: 'sass-loader',
            options: {
              sourceMap: false,
            },
          },
        ],
      }
// additional code, HEY YO remove this block if you don't need it

Solution

I try to downgrade css-loader to 3.5.3,webpack builded ok,I dont know why is it.

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