-
dev
- Rollup default options
- Custom esm module loader
- Rollup like plugin integrations
- hooks
Rollup hooks
- options
- buildStart
- resolveId
- load
- Default load: add support for queries in id
- transform
- moduleParsed (not during dev)
- shouldTransformCachedModule
- watchChange
- buildEnd
- closeBundle
Custom hooks
- config
- configResolved
- Context
Rollup context
- this.resolve
- this.load
- this.parse
- this.getFileName
- this.getModuleInfo
- this.addWatchFile
- this.getWatchFiles
- this.info
- this.warn
- this.error
- this.debug
Custom context
- this.cache
- this.cache.get
- this.cache.set
Fixes
- Remove context from config* hooks, and update context on other hooks
- ordering
- loading
- Allow rollup-only plugins to load with
apply="buid"andenfore="post"orplugins: [ nitePluginExample(), { ...rollupPluginExample(), apply: "build", enfore: "post" } ]
rollup: { // rollup config entry plugins: [ rollupPluginExample() ] }
- Allow rollup-only plugins to load with
- hooks
- Config
- Load config file and add proper types and options
- Parse config file (if it is: ts, etc.)
- Load / Parse package.json for determining package type (module, commonjs, etc.)
- Load / Parse tsconfig.json for esbuild
-
build
- Use rollup to build project
- Apply settings
- Include plugins that apply on build
- Use rollup to build project
-
Server
- Options
- Manually register loader (
server.register()orserver.registerLoader())
- Manually register loader (
- Move esm loader registration to createServer
- Maybe move plugin container to loader thread to avoid performance impact
- Build a 'bridge' to allow the server object to call functions on loader thread, etc.
- Maybe move plugin container to loader thread to avoid performance impact
- Move createServer to main thread
- This is to allow user to create the server themselfs, for integrating in other tools
- Function to restart server
- Only register functions on loader thread and use messagebus to communicate form main thread
- MessageBus
- Create
BusNodeto add to classes to more easily create function interfaces - Improve communications
- Create function interfaces
- Maybe create a seperate module from this?
- Create
- Doesn't work on linux, looks like the leading slash from urls is removed?
- Options
-
DX
- Proper error handling
- Nodejs operations with errorcodes
- Parse error codes to proper messages in console
- Change nodejs errors to have proper file lines, instead of the build one (only in build mode)
- Nite errors with proper error messages
- Code 'chunks' where the error occured (similar to esbuild and wmr)
Generate code chunks from e.g. this:
file:///C:/Users/Robin/Documents/Programming/Home/homecontrols/api/test.ts:2 export function test(log: string): boolean { ^ SyntaxError: Unexpected token ':' at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:152:18) at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:298:14) Node.js v18.19.0
- Code 'chunks' where the error occured (similar to esbuild and wmr)
Generate code chunks from e.g. this:
- Nodejs operations with errorcodes
- Dev 'server' with reloading on file change, or shortcut in terminal
- Devtools with load/transform stack overview (like vite-plugin-inspect) (in seperate plugin?)
- Statically analyze imported (ts) code to check for (type) errors, on seperate thread?
- Add logLevel option to see debug logs
- Improve performance
- Specifically startup time
- Improve module bundling to solve this?
- Specifically startup time
- Proper error handling
-
optimzeDeps
- Bundle the library into single file (like vite)
- "Error: Cannot find module @rollup/rollup-win32-x64-msvc. npm has a bug related to optional dependencies" (with prebundled version of vite)
- Optimize code
- Converted to esm
- Add config option to exclude/include libraries (optimizeDeps from vite)
- optimizeDeps.include is not yet used
- Bundle the library into single file (like vite)
-
Env
- Load .env files same way that vite does it
- I think it's the same but haven't tested it thoroughly yet
- Add env to import.meta.env (also add vite's custom env variables)
- Load .env files same way that vite does it
-
Imports
- Allow importing from links? (like in deno?)
- Import aliases
- Import queries
*?nodecompletely skip plugins on import- Different queries for asset loading (html, css, etc.)?
-
Caching
- Implement cache comparing (with hash?)
- Use cache when loads are similar
- Implement hook to cancel using cache (shouldTransformCachedModule)
- Add config option to change / disable behaiviour
-
https://github.com/preactjs/wmr/blob/main/packages/wmr/src/lib/rollup-plugin-container.js
-
Notifications
You must be signed in to change notification settings - Fork 0
License
Codefoxdev/nite
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published