Skip to content

Commit 8732070

Browse files
authored
fix: Respect custom Ember module names. (#303)
1 parent fb0a7a0 commit 8732070

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/@css-blocks/ember-cli/index.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ module.exports = {
3838
_owners: new Set(),
3939

4040
_modulePrefix() {
41-
let parent = this.parent;
42-
let config = typeof parent.config === "function" ? parent.config() || {} : {};
43-
let name = typeof parent.name === "function" ? parent.name() : parent.name;
44-
return parent.modulePrefix || config.modulePrefix || name || "";
41+
const parent = this.parent;
42+
const config = typeof parent.config === "function" ? parent.config() || {} : {};
43+
const name = typeof parent.name === "function" ? parent.name() : parent.name;
44+
const moduleName = typeof parent.moduleName === "function" ? parent.moduleName() : parent.moduleName;
45+
return moduleName || parent.modulePrefix || config.modulePrefix || name || "";
4546
},
4647

4748
// Shared AST plugin implementation for Glimmer and Ember.

0 commit comments

Comments
 (0)