Skip to content

Commit 7637f53

Browse files
committed
Add support for ember-cli 6
1 parent 89c0e21 commit 7637f53

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/preprocessor/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727

2828
const options = this._options(app);
2929
const preprocessors = Object.assign({}, options.preprocessors);
30-
registry.add('css', new Preprocessor(preprocessors));
30+
registry.add('css', new Preprocessor(preprocessors, options.outputPaths));
3131
},
3232

3333
name: require('./package').name,

packages/preprocessor/lib/preprocessor.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const merge = require('broccoli-merge-trees');
77
const witeFile = require('broccoli-file-creator');
88

99
module.exports = class Preprocessors {
10-
constructor(preprocessors) {
10+
constructor(preprocessors, outputPaths) {
11+
this.outputPaths = outputPaths;
1112
this.preprocessors = preprocessors;
1213
this.ext = this.extensions;
1314
}
@@ -26,7 +27,8 @@ module.exports = class Preprocessors {
2627
toTree(node, inputPath, outputPath, options) {
2728
const styles = [];
2829

29-
for (const [project, outFile] of Object.entries(options.outputPaths)) {
30+
// the `??` is for `ember-cli` 5 compatibility
31+
for (const [project, outFile] of Object.entries(this.outputPaths ?? options.outputPaths)) {
3032
styles.push(
3133
this.preprocess({
3234
node,

0 commit comments

Comments
 (0)