@utoo/web 1.2.0-rc.8 → 1.2.0
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.
- package/README.md +14 -12
- package/esm/{8f0451c2e61477918e02.wasm → cb25445c9f3a2acfc918.wasm} +0 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.js +3 -2
- package/esm/loaderWorker.js +1 -1
- package/esm/{forkedProject.d.ts → project/ForkedProject.d.ts} +4 -3
- package/esm/{forkedProject.js → project/ForkedProject.js} +4 -1
- package/esm/{internalProject.d.ts → project/InternalProject.d.ts} +3 -2
- package/esm/{internalProject.js → project/InternalProject.js} +12 -9
- package/esm/{project.d.ts → project/Project.d.ts} +2 -1
- package/esm/{project.js → project/Project.js} +11 -8
- package/esm/serviceWorker.js +2 -2
- package/esm/{type.d.ts → types.d.ts} +5 -0
- package/esm/utoo/index.d.ts +68 -13
- package/esm/utoo/index.js +282 -142
- package/esm/utoo/index_bg.wasm +0 -0
- package/esm/webpackLoaders/cjs.js +4 -32
- package/esm/webpackLoaders/loaderWorkerPool.d.ts +1 -1
- package/esm/webpackLoaders/loaderWorkerPool.js +1 -20
- package/esm/webpackLoaders/polyfills/fsPolyfill.d.ts +1 -1
- package/esm/webpackLoaders/polyfills/fsPolyfill.js +57 -46
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.d.ts +1 -1
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.js +1 -1
- package/esm/webpackLoaders/{type.d.ts → types.d.ts} +0 -1
- package/esm/webpackLoaders/worker.js +0 -7
- package/esm/worker.js +2 -2
- package/package.json +10 -9
- package/esm/sabcom.d.ts +0 -61
- package/esm/sabcom.js +0 -203
- /package/esm/{type.js → types.js} +0 -0
- /package/esm/{installServiceWorker.d.ts → utils/installServiceWorker.d.ts} +0 -0
- /package/esm/{installServiceWorker.js → utils/installServiceWorker.js} +0 -0
- /package/esm/{message.d.ts → utils/message.d.ts} +0 -0
- /package/esm/{message.js → utils/message.js} +0 -0
- /package/esm/webpackLoaders/{type.js → types.js} +0 -0
package/README.md
CHANGED
|
@@ -2,23 +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
|
|
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
|
-
- 🌐 **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
9
|
- 📂 **Real File System**: Uses Origin Private File System (OPFS) for a Node.js-like file system experience.
|
|
10
|
+
- 📦 **Browser Dependency Resolution**: Resolve dependencies directly from `package.json` without needing a pre-existing lock file. Supports custom registries (npm, npmmirror, private registries).
|
|
11
|
+
- 🌐 **Browser-based Bundling**: Run the Utoo bundler directly in the browser.
|
|
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. **Real 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. **Loader Worker**: Executes Webpack loaders in a dedicated worker with Node.js polyfills.
|
|
21
|
-
5. **Service Worker**: Acts as a local server to intercept requests and serve built files for preview.
|
|
22
16
|
|
|
23
17
|
## 📦 Installation
|
|
24
18
|
|
|
@@ -44,6 +38,14 @@ npm run install-toolchain
|
|
|
44
38
|
npm run build
|
|
45
39
|
```
|
|
46
40
|
|
|
41
|
+
### Run Demo
|
|
42
|
+
|
|
43
|
+
To run the web demo:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm start -w utooweb-demo
|
|
47
|
+
```
|
|
48
|
+
|
|
47
49
|
## 📚 Documentation
|
|
48
50
|
|
|
49
51
|
For detailed API usage and examples, please refer to the [API Documentation](./API.md) ([中文版](./API_zh-CN.md)).
|
|
Binary file
|
package/esm/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
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 {
|
|
2
|
-
export
|
|
1
|
+
export { compatOptionsFromWebpack, } from "@utoo/pack-shared";
|
|
2
|
+
export { Project } from "./project/Project";
|
|
3
|
+
export * from "./types";
|