Giter Site home page Giter Site logo

Comments (6)

evbo avatar evbo commented on August 18, 2024 1

@cornerman I don't mean to speak for everyone, as I know webpack is still one of the most popular bundlers, but Vite has sort of taken the bundling world by storm! I think many people using Scalajs use Vite, and hence scalajs-bundler might not be getting as much love as it used to.

I know this may be off-topic or counter-productive, but if you can bite the bullet, I migrated to Vite within a day for a fairly large project. And I'm never looking back...

Sjs did an amazing job presenting, so it's a breeze :)
https://www.youtube.com/watch?v=dv7fPmgFTNA

I hope this helps...

from scalajs-bundler.

ptrdom avatar ptrdom commented on August 18, 2024

There is a really old unmerged PR that solves this - #408.

from scalajs-bundler.

evbo avatar evbo commented on August 18, 2024

@ptrdom I am similarly getting an error due to loc in WebpackError being optional as well. I think this was caused by the JS library weeknumber (1.2.1) having some funny errors with loc (the line number of the error) missing because I didn't have this happen until I added it as a dependency.

According to the docs, WebPack only mentions message and refers to all other fields as "various" (does that mean they "vary" in existence and should be optional?):
https://webpack.js.org/api/stats/#errors-and-warnings

My error is resolved with this addition to your PR:

final case class WebpackError(moduleName: Option[String], message: String, loc: Option[String])

from scalajs-bundler.

ptrdom avatar ptrdom commented on August 18, 2024

@evbo Good eye, I did not spot that in docs. I will implement your suggestion. Maybe adding the stack trace would be a good idea too.

from scalajs-bundler.

cornerman avatar cornerman commented on August 18, 2024

I am currently hitting this issue when upgrading to the new version with webpack 5. Indeed, there are warnings without a moduleName as already mentioned. Is anything blocking the linked PR?

from scalajs-bundler.

cornerman avatar cornerman commented on August 18, 2024

@evbo Thanks for sharing your good experience with vite and the video. I want to look into vite, but did not find the time yet.

For now updating to webpack 5 seemed a bit faster. My current workaround is using ignoreWarning in my webpack config.

from scalajs-bundler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.