mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-11 14:45:59 +08:00
Fix webpack if no addons are present [SCI-7916]
This commit is contained in:
parent
5eb7fa8363
commit
8f6d1f7872
1 changed files with 10 additions and 1 deletions
|
|
@ -11,7 +11,16 @@ environment.loaders.prepend('vue', vue)
|
||||||
|
|
||||||
// Engine pack loading based on https://github.com/rails/webpacker/issues/348#issuecomment-635480949
|
// Engine pack loading based on https://github.com/rails/webpacker/issues/348#issuecomment-635480949
|
||||||
// Get paths to all engines' folders
|
// Get paths to all engines' folders
|
||||||
const enginePaths = execSync('ls -d $PWD/addons/*').toString().split('\n').filter((p) => !!p);
|
console.log('Including packs from addons...');
|
||||||
|
|
||||||
|
let enginePaths = [];
|
||||||
|
|
||||||
|
try {
|
||||||
|
enginePaths = execSync('ls -d $PWD/addons/*').toString().split('\n').filter((p) => !!p);
|
||||||
|
} catch {
|
||||||
|
console.log('Unable to find any addons.')
|
||||||
|
}
|
||||||
|
|
||||||
enginePaths.forEach((path) => {
|
enginePaths.forEach((path) => {
|
||||||
const packsFolderPath = `${path}/app/javascript/packs`;
|
const packsFolderPath = `${path}/app/javascript/packs`;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue