Giter Site home page Giter Site logo

Comments (4)

nigredo-tori avatar nigredo-tori commented on July 18, 2024 1

@julienrf, scalaJSNativeLibraries only helps with *.js files - and webpack supports a lot more (this also reuses pre-existing key from another library, which is probably not a good idea). Webpack gives a lot of flexibility in collecting and mapping files, and we shouldn't put restrictions on it. At least not without an escape hatch.
A separate key for the monitored files would be a convenient and flexible solution, in my opinion, though it would place a burden on API user to collect the files (which doesn't look like an insurmountable problem). An alternative would be some combination of directory list with filtering, I suppose - something like unmanagedSourceDirectories/unmanagedSources/includeFilter/excludeFilter.

By "generated data" I mean the generated json string. Though simply concatenating all the relevant input to writePackageJson, and using it as a "hash" seems to do the trick here - and is extremely simple to implement. No need to prematurely optimize/generalize this at the moment.

from scalajs-bundler.

julienrf avatar julienrf commented on July 18, 2024

For the webpack task, I would not disable caching because bundling times can be quite long. An improvement could be to take into account the scalaJSNativeLibraries for the hash. We could also introduce a monitoredResources key, similar to the one introduced by sbt-web-scalajs, but I wonder if there isn’t a more standard solution.

For package.json, indeed the caching mechanism used is wrong. What do you mean by “the generated data”?

from scalajs-bundler.

julienrf avatar julienrf commented on July 18, 2024

Thanks for detailed explanation. I think we should go with a key for the monitored files.

from scalajs-bundler.

dispalt avatar dispalt commented on July 18, 2024

This would be very useful for me too.

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.