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

Problem with webpackBundlingMode := BundlingMode.LibraryOnly() and the generated entrypoints.txt file #346

Open
kalejami opened this issue May 19, 2020 · 0 comments

Comments

@kalejami
Copy link

kalejami commented May 19, 2020

First of all. Thanks for the great project :)

I run in some problems with webpackBundlingMode := BundlingMode.LibraryOnly().

If I observed it the right way an entrypoint.txt file is generated in the target folder from which the entrypoints.js file is generated. Every used @JSImport in the sources of the project will be used to generate these files.

Now to my problem. If I use different or no JsImports in the tests of the project my entrypoints.txt file will be empty. And if I start the server with this empty file the client-fastopt-library.js will have no module.exports from the endpoint.js file and the web page can't be rendered because of the missing dependecies.

I created a sample project to reproduce the problem:

https://github.com/kalejami/scalajs-bundler-test

In sbt shell following steps will cause this problem:

  1. serverJVM/reStart <-- server is running and all jsDependencies are ok, web page is rendered. everything is fine.
  2. clientJS/test <-- will overwrite the entrypoints.txt and js so no module.exports from endpoint.js in client-fastopt-library.js anymore
  3. serverJVM/reStart <- won't touch entrypoints so the jsDependencies in library.js are missing and the web page won't load anymore
@kalejami kalejami changed the title Problem with LibraryMode + entrypoints.txt File Problem with webpackBundlingMode := BundlingMode.LibraryOnly() and the generated entrypoints.txt file May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant