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
I'm using bakery app (latest commit is 93f120fab1c139100593f087c5ff0226a3521d3d ).
I've modified the pom.xml file via replacing a custom resources unpack goal ( "unpack-flow-component-renderer-html") and transpilation by flow-maven plugin:
you still need the copy task ( from appropriate directory) to src/main/webapp/frontend directory. The place which Spring boot uses to handle web resource.
you need to modify flow maven plugin to avoid dependency to Flow snapshot (and use appropriate flow release version ).
I use Spring boot run task (make sure that you use the appropriate paths to transpiled files).
In the result: application is loading ( there are not at least exceptions about inability to find HTML import resources in the context) but it fails because of babel-helpers.
There the an exception on the clien side :
Uncaught ReferenceError: babelHelpers is not defined
at i (highstock.js:1)
at Object.f.merge (highstock.js:1)
at Object.f.seriesType (highstock.js:1)
at highstock.js:1
at highstock.js:1
at highstock.js:1
at highstock.js:1
It looks like babel-helpers is referenced from high charts but it's not available ( and most likely should not be available since they should be inlined only for es5 as I see from the BootstrapHandler.java).
It might be that I'm doing something wrong but anyway the configuration of the plugin is quite unclear especially in Spring case.
May be we need to do something to improve this for Spring somehow.
In the result: application is loading ( there are not at least exceptions about inability to find HTML import resources in the context) but it fails because of babel-helpers.
you still need the copy task ( from appropriate directory) to src/main/webapp/frontend directory. The place which Spring boot uses to handle web resource.
If I understand correctly, we need to make sure the plugin works auto-of-the-box when it is used with Spring.
you still need the copy task ( from appropriate directory) to src/main/webapp/frontend directory. >>The place which Spring boot uses to handle web resource.
If I understand correctly, we need to make sure the plugin works auto-of-the-box when it is used with Spring.
I'm not sure whether it's feasible actually. One needs to copy transpiled files from "build" directory to sources so that Spring sees them as web resources.
This is done at the moment as a separate task in Bakery (there is a copy step).
It would be very good to avoid such copy since it's an overhead and you should know about this.
But how we can do this in reality: we should somehow detect Spring in the project and also we should somehow know which exactly folder is used in this project for web resources (Bakery uses src/main/webapp/ but I'm pretty sure it can be changed via configuration).
It would be very good to avoid such copy since it's an overhead
Does it really matter? From my understanding, the copying is only needed for production builds, so it's quite acceptable that they are not lightning fast.
Does it really matter? From my understanding, the copying is only needed for production builds, so it's quite acceptable that they are not lightning fast.
The problem is the knowledge of this step. Not its speed.
I don't know which folder should I copy and I don't even know that I have to copy.
If we have a plugin then I expect that it does all boilerplate work for me. Otherwise why should I use it at all if I can do the same things using another ways?
Add the instructions on what to change for flow-maven-plugin configuration for making a production build, when working with Spring apps to the following places:
@denis-anisimov commented on Fri Jan 12 2018
I'm using bakery app (latest commit is 93f120fab1c139100593f087c5ff0226a3521d3d ).
I've modified the pom.xml file via replacing a custom resources unpack goal ( "unpack-flow-component-renderer-html") and transpilation by flow-maven plugin:
Note that :
src/main/webapp/frontend
directory. The place which Spring boot uses to handle web resource.I use Spring boot run task (make sure that you use the appropriate paths to transpiled files).
In the result: application is loading ( there are not at least exceptions about inability to find HTML import resources in the context) but it fails because of
babel-helpers
.There the an exception on the clien side :
It looks like
babel-helpers
is referenced from high charts but it's not available ( and most likely should not be available since they should be inlined only fores5
as I see from theBootstrapHandler.java
).It might be that I'm doing something wrong but anyway the configuration of the plugin is quite unclear especially in Spring case.
May be we need to do something to improve this for Spring somehow.
@pleku commented on Fri Jan 12 2018
For the babel helpers there is already https://github.com/vaadin/flow-maven-plugin/issues/31
If I understand correctly, we need to make sure the plugin works auto-of-the-box when it is used with Spring.
@denis-anisimov commented on Fri Jan 12 2018
Good. Didn't know that. Then it should be fixed.
I'm not sure whether it's feasible actually. One needs to copy transpiled files from "build" directory to sources so that Spring sees them as web resources.
This is done at the moment as a separate task in Bakery (there is a copy step).
It would be very good to avoid such copy since it's an overhead and you should know about this.
But how we can do this in reality: we should somehow detect Spring in the project and also we should somehow know which exactly folder is used in this project for web resources (Bakery uses
src/main/webapp/
but I'm pretty sure it can be changed via configuration).@Legioth commented on Mon Jan 15 2018
Does it really matter? From my understanding, the copying is only needed for production builds, so it's quite acceptable that they are not lightning fast.
@denis-anisimov commented on Mon Jan 15 2018
The problem is the knowledge of this step. Not its speed.
I don't know which folder should I copy and I don't even know that I have to copy.
If we have a plugin then I expect that it does all boilerplate work for me. Otherwise why should I use it at all if I can do the same things using another ways?
@pleku commented on Mon Jan 15 2018
Acceptance Criteria
Add the instructions on what to change for
flow-maven-plugin
configuration for making a production build, when working with Spring apps to the following places:The text was updated successfully, but these errors were encountered: