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

Composing SCSS modules does not transpile the SCSS #1267

Closed
akanix42 opened this issue May 11, 2018 · 1 comment
Closed

Composing SCSS modules does not transpile the SCSS #1267

akanix42 opened this issue May 11, 2018 · 1 comment
Labels

Comments

@akanix42
Copy link

Version

3.0.0-beta.6

Reproduction link

https://github.com/nathantreid/vue-cli-composes-issue

Steps to reproduce

Create a scss module file with scss-specific syntax such as a variable (foo.module.scss):

$blue: blue;

.foo {
  color: $blue;
}

Compose it into your Vue file:

<style lang="scss" module>
.bar {
  composes: foo from './foo.module.scss';
}
</style>
<template>
  <div :class="$style.bar">test</div>
</template>

What is expected?

The SCSS should be transpiled, the style should be applied, and the text color should be blue.

What is actually happening?

The SCSS is pulled in untranspiled, so the CSS is invalid and is not applied.


The linked reproduction consists of 3 commits:

  1. the inital vue-cli install commit
  2. an autoformatting commit
  3. the actual changes I made to reproduce the issue
@akanix42
Copy link
Author

akanix42 commented May 11, 2018

I've discovered that prefixing the composition path with sass-loader! does the trick, but it still shouldn't be necessary since these are .scss files. So this works:

<style lang="scss" module>
.bar {
  composes: foo from 'sass-loader!./foo.module.scss';
}
</style>

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

No branches or pull requests

2 participants