Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<style lang="sass" src="xxx.sass"></style> results in error after migrated to v15 #1279

Closed
whitetrefoil opened this issue May 2, 2018 · 1 comment

Comments

@whitetrefoil
Copy link

Version

15.0.3

Reproduction link

https://github.com/whitetrefoil/vue-ts-arch/tree/2598ca63e3a0762b5d429a7a052261faabc97c0b

Steps to reproduce

npx gulp build

What is expected?

code built

What is actually happening?

ERROR in ./modules/hello/index.sass?vue&type=style&index=0&lang=sass (../node_modules/mini-css-extract-plugin/dist/loader.js!../node_modules/css-loader?minimize&safe&importLoaders=3!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/lib!../node_modules/resolve-url-loader?keepQuery!../node_modules/sass-loader/lib/loader.js??ref--9-4!../node_modules/sass-loader/lib/loader.js??ref--18-4!./modules/hello/index.sass?vue&type=style&index=0&lang=sass)
Module build failed: ModuleBuildError: Module build failed: 
@charset "UTF-8"
       ^
      Invalid CSS after ".hello {": expected "}", was "{"
      ......

IMPORTANT: This is sAss, not sCss.

This will cause error:

<style lang="sass" src="./index.sass"></style>

This is OK:

<style lang="sass">
.hello
  font-size: 150%
</style>

And here is webpack config:

      {
        test: /\.vue/,
        use : ['vue-loader'],
      },
      {
        test: /\.sass$/,
        use : [
          'vue-style-loader',
          'css-loader?sourceMap&importLoaders=3',
          'postcss-loader?sourceMap',
          'resolve-url-loader?sourceMap',
          {
            loader : 'sass-loader',
            options: {
              sourceMap     : true,
              indentedSyntax: true,
              outputStyle   : 'expanded',
              precision     : 8,
            },
          },
        ],
      },
@yyx990803
Copy link
Member

yyx990803 commented May 2, 2018

Same issue with #1278 and fixed by 37329e1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants