Skip to content

Commit 746fd46

Browse files
committed
use module extension
1 parent 39bcc31 commit 746fd46

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Syntax:
3535
{{import "{ fn }" from "@ember/helper"}}
3636
{{import myHelper from 'ui/helper'}}
3737
{{import my-mod from 'ui/modifiers'}}
38-
{{import style from './styles.scoped.scss'}}
38+
{{import style from './styles.module.scss'}}
3939
{{import BasicDropdown from 'ember-basic-dropdown/components/basic-dropdown'}}
4040
{{import SameDropdown from 'ember-basic-dropdown/components/basic-dropdown'}}
4141

lib/StylesRewriter.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ module.exports = class StylesRewriter extends BroccoliFilter {
2323
this.options.extension = this.options.extension || 'scss';
2424
this.options.before = this.options.before || [];
2525
this.options.after = this.options.after || [];
26-
this.extensions = [ 'scoped.' + this.options.extension ];
27-
this.targetExtension = 'scoped.' + this.options.extension;
26+
this.extensions = [ 'module.' + this.options.extension ];
27+
this.targetExtension = 'module.' + this.options.extension;
2828
}
2929

3030
cacheKeyProcessString(string, relativePath) {
@@ -43,7 +43,7 @@ module.exports = class StylesRewriter extends BroccoliFilter {
4343
if (relativePath.endsWith('pod-styles.scss')) {
4444
return contents;
4545
}
46-
if (relativePath.endsWith('scoped.scss')) {
46+
if (relativePath.endsWith('module.scss')) {
4747
const plugins = [...this.options.before]
4848
plugins.push(rewriterPlugin({
4949
filename: relativePath,
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
{{import style from "./styles.scoped.scss"}}
1+
{{import style from "./styles.module.scss"}}
22

33
<button class="global-button {{style.btn}}">{{style.btn}}{{yield}}</button>

test-folders/mixed-tests/dummy/app/ui/routes/application/template.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{import style from "./styles.scoped.scss"}}
1+
{{import style from "./styles.module.scss"}}
22

33
{{import Button from "~/ui/components/button"}}
44
{{import helper2 from "~/ui/helpers/helper"}}

0 commit comments

Comments
 (0)