use config to determine active theme

This commit is contained in:
Art Lowel
2019-06-04 17:12:12 +02:00
parent 8bccdac99d
commit c58e6f6239
8 changed files with 224 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
const replace = require('replace-in-file');
const {
projectRoot,
} = require('../webpack/helpers');
/**
* This script ensures you can use ~ to reference the project dir
* in scss imports for AoT builds as well.
*/
const options = {
files: projectRoot('build') + '/**/*.scss',
from: /@import '~\//g,
to: `@import '${projectRoot('./')}/`,
};
try {
replace.sync(options);
}
catch (error) {
console.error('Error occurred:', error);
}