mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-09 21:56:32 +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
|
||||
// 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) => {
|
||||
const packsFolderPath = `${path}/app/javascript/packs`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue