Giter VIP home page Giter VIP logo

Comments (5)

cometkim avatar cometkim commented on June 22, 2024 1

I will add nanobundle dev command.

I'd like to mention that the experience design for this is complex compared to other tools. This is because nanobundle doesn't just act as a proxy for tsc, also needs to support multiple entries.

But naively reporting all diagnostics for all entries during development won't work very well. Not necessarily simultaneous. One of the best rules of thumb for a good development experience (especially when refactoring types) is "focus on one problem at a time".

from nanobundle.

cometkim avatar cometkim commented on June 22, 2024

I'm more focused on getting the build right in v1. But this will definitely be on my future tasks!

For TypeScript projects, I can imagine a scenario where type-checks are prioritized and then incremental builds are performed if they pass. What would be the ideal dev mode experience imaginable if you weren't using TypeScript?

from nanobundle.

easylogic avatar easylogic commented on June 22, 2024

I am replacing watch in the following way. please refer to this.

    "watch": "chokidar \"src/*\" -c \"npm run nano:build\" --polling",

from nanobundle.

cometkim avatar cometkim commented on June 22, 2024

Drops some implementation ideas here:

While esbuild's watch and node's fs.watchFile use stats polling, node's fs.watch provides an optimized implementation for each platform, so it would be reasonable to implement based on this.

Also, instead of recursively traversing a specific path, selecting only the modules reachable from the entry point inferred from the manifest effectively narrows the watch and makes better system compatibility. Perhaps it should run esbuild with two-path for this.

from nanobundle.

cometkim avatar cometkim commented on June 22, 2024

All entries and their dependencies should be watched in the soon-to-be-added "unbundle" mode (#166).

How about in bundling mode? Typically, we don't test multiple entries at once in development, so maybe we can narrow it down to some of the JS bundle groups.

  • the main entry
  • exported to subpath
  • module format matching package type
  • development condition

from nanobundle.

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.