Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/namespace/lib/namespace-helper-ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function addArguments(builders) {
}

function addNamespaceArguments(node, moduleName, builders) {
if (node.path.original !== 'style-namespace') return;
if (Object.prototype.hasOwnProperty.call(node.path, 'value') || node.path.original !== 'style-namespace') return;

const allArguments = getArguments(moduleName);
const neededArguments = allArguments.filter(
Expand Down
2 changes: 1 addition & 1 deletion packages/preprocessor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {

const options = this._options(app);
const preprocessors = Object.assign({}, options.preprocessors);
registry.add('css', new Preprocessor(preprocessors));
registry.add('css', new Preprocessor(preprocessors, options.outputPaths));
},

name: require('./package').name,
Expand Down
6 changes: 4 additions & 2 deletions packages/preprocessor/lib/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ const merge = require('broccoli-merge-trees');
const witeFile = require('broccoli-file-creator');

module.exports = class Preprocessors {
constructor(preprocessors) {
constructor(preprocessors, outputPaths) {
this.preprocessors = preprocessors;
this.outputPaths = outputPaths;
this.ext = this.extensions;
}

Expand All @@ -26,7 +27,8 @@ module.exports = class Preprocessors {
toTree(node, inputPath, outputPath, options) {
const styles = [];

for (const [project, outFile] of Object.entries(options.outputPaths)) {
// the `??` is for `ember-cli` 5 compatibility
for (const [project, outFile] of Object.entries(this.outputPaths ?? options.outputPaths)) {
styles.push(
this.preprocess({
node,
Expand Down
Loading