mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
add syncbuilddir step to aot build
This commit is contained in:
23
webpack/run-replace.js
Normal file
23
webpack/run-replace.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const replace = require('replace-in-file');
|
||||
const {
|
||||
projectRoot,
|
||||
} = require('./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);
|
||||
}
|
Reference in New Issue
Block a user