scalacenter / scalajs-bundler

https://scalacenter.github.io/scalajs-bundler
Other
237 stars 101 forks source link

Failure to parse Webpack stats fails the build #424

Open ptrdom opened 2 years ago

ptrdom commented 2 years ago

Failure to parse Webpack stats can fail builds with certain Webpack configs. It should probably be a critical failure, rather than logging with return of an Option.

ptrdom commented 2 years ago

Related to https://github.com/scalacenter/scalajs-bundler/issues/423.

evbo commented 2 years ago

and related to https://github.com/scalacenter/scalajs-bundler/issues/338 which was closed because I presumed the PR would get merged, but it never did - shame on me :)

evbo commented 2 years ago

Also, @ptrdom did you try sbt publishLocal with your fork? I tried it and my project failed to resolve it as a dependency due to scalajs-bundler-linker not getting published locally. I had to add it to the build.sbt aggregate statement here: https://github.com/scalacenter/scalajs-bundler/blob/main/build.sbt#L90

Curious to know how you managed to publish locally without that fix...

ptrdom commented 2 years ago

@evbo I ran into the same issue and simply published the module explicitly, same as the CI workflow does it - https://github.com/scalacenter/scalajs-bundler/blob/main/.github/workflows/release.yml#L21-L22. Adding the project to aggregate makes sense to me.

ptrdom commented 2 years ago

@sjrd Can we merge this?

ptrdom commented 2 years ago

@sjrd I made changes for which I did not have further questions, please review the discussions and the code when you can.

annedroiid commented 2 years ago

@sjrd Are the latest changes acceptable? Do you need any help with this?

rmmeans commented 9 months ago

Wondering if this PR will be up for consideration in the future? I know many are moving to Vite, but our current build process is causing problems with Vite since we're packaging node modules for browser (Autoprefixer and postcss). Didn't have much luck working through (tried following advice https://github.com/postcss/postcss/issues/830, but wasn't able to get it to work).

Was hoping to upgrade to webpack5 on scalajs-bundler until we can refactor how we do CSS to not need autoprefixer running in the browser and then switch to Vite.