mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Merge pull request #4968 from scinote-eln/ma_SCI_7916
Fix webpack if no addons are present [SCI-7916]
This commit is contained in:
commit
03631d28aa
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…
Reference in a new issue