You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we try to use a web-component that has a bower depency to popper.js (ex: https://github.com/bisam-rd/genesis-popover), we are not able to package the project in production mode.
Minimal reproducible example
Use the webjar org.webjars.bowergithub.fezvrasta:popper.js:1.14.3.
With this code:
[Exec Stream Pumper] [INFO] Starting to process frontend files.
[Exec Stream Pumper] [INFO] Will minify frontend files.
[Exec Stream Pumper] [INFO] Will bundle frontend files.
[Exec Stream Pumper] [INFO] Will hash bundle file names.
[Exec Stream Pumper] [INFO] Will copy files to target directory 'D:\Dev\env\b-one-web\web-composite\target\build\frontend-es6'.
[Exec Stream Pumper] [INFO] Starting operations stated above, this might take a while.
[Exec Stream Pumper] [ERROR] Failed to process frontend files.
[Exec Stream Pumper] [ERROR] error: Error: ENOENT: no such file or directory, open 'D:\Dev\env\b-one-web\web-composite\target\frontend\bower_components\popper.js\dist\umd\popper.min.js'
After further investigation, we found that the bower version of popperjs contains two bower.json files in different directories.
Therefore, the method selectCorrectPackage in the maven-flow-plugin randomly selects one of the directories for packaging.
Expected behavior
The top most bower.json is used when two bower.json are found in the same webjar ?
Actual behavior
Randomly selected directory is packaged.
The text was updated successfully, but these errors were encountered:
bisam-rd
changed the title
Problem bundling dependency with multiple bower.json
flow-maven-plugin: Problem bundling dependency with multiple bower.json
Jul 18, 2018
Hey, thank you for the report, the fix is in the review currently.
One tiny things to notice: the package name is popper.js, so you should import is as @JavaScript("frontend://bower_components/popper.js/dist/umd/popper.min.js")
When we try to use a web-component that has a bower depency to popper.js (ex: https://github.com/bisam-rd/genesis-popover), we are not able to package the project in production mode.
Use the webjar
org.webjars.bowergithub.fezvrasta:popper.js:1.14.3
.With this code:
The build with the
flow-maven-plugin
fails.After further investigation, we found that the bower version of popperjs contains two bower.json files in different directories.
Therefore, the method selectCorrectPackage in the maven-flow-plugin randomly selects one of the directories for packaging.
The top most bower.json is used when two bower.json are found in the same webjar ?
Randomly selected directory is packaged.
The text was updated successfully, but these errors were encountered: