Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CCDM: importing generated-flow-imports in index.ts does not create a valid stats.json for production #337

Open
manolo opened this issue Feb 12, 2020 · 0 comments
Labels
bug Something isn't working hilla Issues related to Hilla Impact: Low Severity: Minor

Comments

@manolo
Copy link
Member

manolo commented Feb 12, 2020

1.- in flow-tests/test-embedding/embedding-test-assets run mvn install
2.- in flow-tests/test-embedding/test-embedding-production enable client side bootstrapping

<properties>
    ...
    <vaadin.useDeprecatedV14Bootstrapping>false</vaadin.useDeprecatedV14Bootstrapping>
<properties>

3.- run mvn verify and every tests will fail
4.- create a frontend/index.ts file with just this content

import '../target/frontend/generated-flow-imports';

5.- run mvn verify and most tests pass but those that need view templates (there are exceptions in console when reading the template content from stats)
6.- check the content of target/classes//META-INF/VAADIN/config/stats.json and we can see that there are no modules for the required template

Otherwise by running mvn verify -Dvaadin.useDeprecatedV14Bootstrapping=true all tests pass, and the content of the stats file has the correct modules.

Note: that the import in the index.js file is needed since the application is exported as webcomponents and vaadin bootstrap is not needed but custom pages that includes the web component.

Other options for fixing webcomponents might be to deliver two bundles by webpack, one for the index.html that serves regular vaadin pages via index.ts, and another with the webcomponents with just the generated imports file

@manolo manolo added bug Something isn't working hilla Issues related to Hilla labels Feb 12, 2020
@manolo manolo changed the title CCDM: importing generated-flow-imports in index.ts does not create a valid stats.json CCDM: importing generated-flow-imports in index.ts does not create a valid stats.json for production Feb 12, 2020
@vaadin-bot vaadin-bot transferred this issue from vaadin/flow Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla Impact: Low Severity: Minor
Projects
None yet
Development

No branches or pull requests

2 participants