nguyenvanduocit / vue-cli-plugin-style-resources-loader

Vue cli plugin to support style-resources-loader.
58 stars 7 forks source link

"//xxx" makes all style files by imported invalid, when "/*xxx*/" is valid #11

Closed lvjiaxuan closed 5 years ago

lvjiaxuan commented 5 years ago

error example

imports.scss

// variable
$menusWidth: 180px;
$navbarHeight: 50px;
$maxNewsWidth: 380px;

vue.config.js

pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'scss',
      patterns: [
        resolve('src/styles/import.scss'),
      ],
    }
  },

valid example

imports.scss

/*variable*/
$menusWidth: 180px;
$navbarHeight: 50px;
$maxNewsWidth: 380px;

vue.config.js

pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'scss',
      patterns: [
        resolve('src/styles/import.scss'),
      ],
    }
  },

???

nguyenvanduocit commented 5 years ago

I can't reproduce the issue. I think it is related to style minify. Maybe other package removed newline, then your code become

// variable $menusWidth: 180px;$navbarHeight: 50px;$maxNewsWidth: 380px;

Your code had been commented.