Git Product home page Git Product logo

Comments (7)

sjrd avatar sjrd commented on August 22, 2024 1

One easy way to test in advance whether an AMD ModuleKind would work is to use a CommonJS-to-AMD converter, and time the results of working with the AMD module (discounting the time taken by the converter).

from scalajs-bundler.

julienrf avatar julienrf commented on August 22, 2024

Not sure webpack-dev-server would help because anyway the output of Scala.js is one module of several megabytes.

Another solution would be to have another kind of ModuleKind which would emit AMD modules so that there would be no need of bundling process (we would just need to transform the modules (once) into the AMD format).

from scalajs-bundler.

julienrf avatar julienrf commented on August 22, 2024

Some numbers.

Working with a 5k SLOC application, here are some timings when editing code and reloading the app:

Configuration Whole reload Bundling part
fullOptJS, no source maps 27 s 6 s
fastOptJS, no source maps 21 s 15 s
fastOptJS, with source maps 40 s 32 s

Edit: more numbers!

Configuration Whole reload Bundling part
fastOptJS, no source maps, pre-bundling 6s 0s
fastOptJS, with source maps, pre-bundling 7s 0s

from scalajs-bundler.

julienrf avatar julienrf commented on August 22, 2024

Another solution suggested on gitter: bundle all the dependencies and export them in a way that can be directly used by the output of Scala.js (so that this output doesn’t need to be processed by webpack).

from scalajs-bundler.

nafg avatar nafg commented on August 22, 2024

Have you looked into rollup instead of webpack? I've heard it's a lot faster.

from scalajs-bundler.

julienrf avatar julienrf commented on August 22, 2024

I will probably do some tests with rollup, yes.

from scalajs-bundler.

nafg avatar nafg commented on August 22, 2024

scala-js/scala-js#2175 (comment) implies rollup can take 1/4 the time webpack takes

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.