Comments (5)
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.
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.
I am replacing watch
in the following way. please refer to this.
"watch": "chokidar \"src/*\" -c \"npm run nano:build\" --polling",
from nanobundle.
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.
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)
- `--standalone` flag doesn't work
- Bundling Types for a `.cts` File Doesn't Work in a Project With `type` set to `module` HOT 1
- CSS modules
- Support build without bundling HOT 2
- Enable declarationMap by default
- duplicate of tsconfck on the public npm registry HOT 1
- Plan to next build tool
- Subpath imports condition
- Support CSS bundling
- ESBuild codegen
- jsx transform doesn't work HOT 19
- Clean command
- Migrate to Clipanion HOT 3
- Dependency Dashboard
- Support for outputting bundles with JSX extensions HOT 1
- `--no-sourcemap` flag not working HOT 1
- How to generate only index.d.ts without bundle files? HOT 3
- Support custom condition
- Support subpath imports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanobundle.