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
As an plugin example, consider vaadin-grid. It requires extra files to be used in order to function properly, one of the files is gridConnector.js.
Current way of adding those dependencies is to put them into META-INF/resources/frontend so that flow-maven-plugin can copy them to the resulting war. Those files are copied to the frontend:// roots of the app (frontend-es6 and frontend-es5 by default) for production mode.
If we put gridConnector.js to META-INF/resources/frontend/gridConnector.js, we need to reference it:
if we reference the connector as @HtmlImport("frontend://addon.html"), the production mode works fine, since flow-maven-plugin copies files wherever they belong to
But if the user changes development mode frontend directory location with, say, -Dvaadin.frontend.url.dev=context://mySuperDir the application will fail to locate gridConnector.js in development mode.
if we reference the connector as @HtmlImport("context://frontend/gridConnector.js"), the production mode will fail, since there will be no frontend directory after flow-maven-plugin processes the files.
We need to come up with the idea how to fix this.
The text was updated successfully, but these errors were encountered:
To keep the URL structure consistent between development and production,
a configurable frontend prefix is used in all cases. This also helps
simplify the maven setup since there's not need to serve any files from
special locations.
That was the original intention.
We can remove it, sure, just need to double check bakery guys at least, since they are using the feature to have their sources in the src/main/webapp/ directory.
From the quick look at the project setup, it looks like there should be no issues with moving it to src/main/webapp/frontend
As an plugin example, consider
vaadin-grid
. It requires extra files to be used in order to function properly, one of the files isgridConnector.js
.Current way of adding those dependencies is to put them into
META-INF/resources/frontend
so thatflow-maven-plugin
can copy them to the resulting war. Those files are copied to thefrontend://
roots of the app (frontend-es6 and frontend-es5 by default) for production mode.If we put
gridConnector.js
toMETA-INF/resources/frontend/gridConnector.js
, we need to reference it:if we reference the connector as
@HtmlImport("frontend://addon.html")
, the production mode works fine, sinceflow-maven-plugin
copies files wherever they belong toBut if the user changes development mode frontend directory location with, say,
-Dvaadin.frontend.url.dev=context://mySuperDir
the application will fail to locategridConnector.js
in development mode.if we reference the connector as
@HtmlImport("context://frontend/gridConnector.js")
, the production mode will fail, since there will be nofrontend
directory afterflow-maven-plugin
processes the files.We need to come up with the idea how to fix this.
The text was updated successfully, but these errors were encountered: