@utoo/web 1.2.0-rc.7 → 1.2.0-rc.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +14 -11
  2. package/esm/{b0afc1b3f31b4fb74f6b.wasm → 8f9533ebd1c6543b5d26.wasm} +0 -0
  3. package/esm/index.d.ts +3 -2
  4. package/esm/index.js +3 -2
  5. package/esm/loaderWorker.js +1 -1
  6. package/esm/{forkedProject.d.ts → project/ForkedProject.d.ts} +3 -3
  7. package/esm/{forkedProject.js → project/ForkedProject.js} +1 -1
  8. package/esm/{internalProject.d.ts → project/InternalProject.d.ts} +2 -2
  9. package/esm/{internalProject.js → project/InternalProject.js} +2 -2
  10. package/esm/{project.d.ts → project/Project.d.ts} +1 -1
  11. package/esm/{project.js → project/Project.js} +4 -4
  12. package/esm/serviceWorker.js +2 -2
  13. package/esm/utoo/index.d.ts +6 -6
  14. package/esm/utoo/index.js +69 -69
  15. package/esm/utoo/index_bg.wasm +0 -0
  16. package/esm/webpackLoaders/loaderWorkerPool.d.ts +1 -1
  17. package/esm/webpackLoaders/loaderWorkerPool.js +1 -1
  18. package/esm/webpackLoaders/polyfills/fsPolyfill.d.ts +1 -1
  19. package/esm/webpackLoaders/polyfills/fsPolyfill.js +2 -2
  20. package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.d.ts +1 -1
  21. package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.js +1 -1
  22. package/esm/webpackLoaders/worker.js +1 -1
  23. package/esm/worker.js +2 -2
  24. package/package.json +7 -6
  25. /package/esm/{type.d.ts → types.d.ts} +0 -0
  26. /package/esm/{type.js → types.js} +0 -0
  27. /package/esm/{installServiceWorker.d.ts → utils/installServiceWorker.d.ts} +0 -0
  28. /package/esm/{installServiceWorker.js → utils/installServiceWorker.js} +0 -0
  29. /package/esm/{message.d.ts → utils/message.d.ts} +0 -0
  30. /package/esm/{message.js → utils/message.js} +0 -0
  31. /package/esm/{sabcom.d.ts → utils/sabcom.d.ts} +0 -0
  32. /package/esm/{sabcom.js → utils/sabcom.js} +0 -0
  33. /package/esm/webpackLoaders/{type.d.ts → types.d.ts} +0 -0
  34. /package/esm/webpackLoaders/{type.js → types.js} +0 -0
package/README.md CHANGED
@@ -2,22 +2,17 @@
2
2
 
3
3
  > 🌖 Web-compatible version of the Utoo toolchain, powered by [Turbopack](https://turbo.build/pack) and WebAssembly.
4
4
 
5
- `@utoo/web` brings the power of the Utoo bundler to the browser, leveraging WebAssembly to provide high-performance bundling in non-native environments. It enables a complete web development environment, including a virtual file system and dependency management, entirely within the browser.
5
+ `@utoo/web` brings the power of the Utoo bundler to the browser, leveraging WebAssembly to provide high-performance bundling in non-native environments. It enables a complete web development environment, including a real file system and dependency management, entirely within the browser.
6
6
 
7
7
  ## ✨ Features
8
8
 
9
+ - 📂 **Real File System**: Uses Origin Private File System (OPFS) for a Node.js-like file system experience.
10
+ - 📦 **Dependency Management**: Built-in dependency resolution with global shared storage, similar to pnpm.
9
11
  - 🌐 **Browser-based Bundling**: Run the Utoo bundler directly in the browser.
10
- - **WASM Powered**: High performance via WebAssembly bindings of the Turbopack-based core.
11
- - 🛠️ **Web Worker Support**: Offloads heavy bundling tasks to background workers to keep the UI responsive.
12
- - 🔌 **Webpack Compatibility**: Supports a subset of Webpack configurations in the browser.
13
- - 📂 **Virtual File System**: Uses Origin Private File System (OPFS) for a Node.js-like file system experience.
12
+ - 🔌 **Webpack Compatibility**: Supports a subset of Webpack configurations in the browser. See [Features List](../pack/docs/features-list.md) for details.
13
+ - 🔄 **Webpack Loaders**: Compatible with standard Webpack loaders (css-loader, style-loader, etc.).
14
+ - 🎨 **PostCSS & Tailwind**: Support for PostCSS and Tailwind CSS processing.
14
15
 
15
- ## 🧠 Core Concepts
16
-
17
- 1. **Virtual File System**: The project lives in the browser's OPFS.
18
- 2. **Project Main Worker**: Core logic runs in a dedicated worker to keep the UI responsive.
19
- 3. **Thread Worker**: Heavy bundling tasks are offloaded to a worker powered by a ported `tokio` runtime.
20
- 4. **Service Worker**: Acts as a local server to intercept requests and serve built files for preview.
21
16
 
22
17
  ## 📦 Installation
23
18
 
@@ -43,6 +38,14 @@ npm run install-toolchain
43
38
  npm run build
44
39
  ```
45
40
 
41
+ ### Run Demo
42
+
43
+ To run the web demo:
44
+
45
+ ```bash
46
+ npm start -w utooweb-demo
47
+ ```
48
+
46
49
  ## 📚 Documentation
47
50
 
48
51
  For detailed API usage and examples, please refer to the [API Documentation](./API.md) ([中文版](./API_zh-CN.md)).
package/esm/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export { Project } from "./project";
2
- export * from "./type";
1
+ export { compatOptionsFromWebpack, type WebpackConfig, } from "@utoo/pack-shared";
2
+ export { Project } from "./project/Project";
3
+ export * from "./types";
package/esm/index.js CHANGED
@@ -1,2 +1,3 @@
1
- export { Project } from "./project";
2
- export * from "./type";
1
+ export { compatOptionsFromWebpack, } from "@utoo/pack-shared";
2
+ export { Project } from "./project/Project";
3
+ export * from "./types";