@utoo/web 1.2.0-rc.1 → 1.2.0-rc.10
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 +55 -0
- package/esm/{aa0ad15d2a587c43406f.wasm → a0a815481b4ff49f8961.wasm} +0 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.js +3 -2
- package/esm/loaderWorker.js +1 -1
- package/esm/loaderWorker.js.LICENSE.txt +0 -21
- package/esm/{forkedProject.d.ts → project/ForkedProject.d.ts} +5 -3
- package/esm/{forkedProject.js → project/ForkedProject.js} +8 -0
- package/esm/{internalProject.d.ts → project/InternalProject.d.ts} +4 -3
- package/esm/project/InternalProject.js +132 -0
- package/esm/{project.d.ts → project/Project.d.ts} +3 -1
- package/esm/{project.js → project/Project.js} +19 -6
- package/esm/serviceWorker.js +4 -3
- package/esm/{type.d.ts → types.d.ts} +43 -0
- package/esm/types.js +56 -0
- package/esm/utils/sabcom.d.ts +61 -0
- package/esm/utils/sabcom.js +203 -0
- package/esm/utoo/index.d.ts +73 -38
- package/esm/utoo/index.js +165 -141
- package/esm/utoo/index_bg.wasm +0 -0
- package/esm/webpackLoaders/{worker/cjs.js → cjs.js} +65 -41
- package/esm/webpackLoaders/loaderWorkerPool.d.ts +2 -0
- package/esm/webpackLoaders/loaderWorkerPool.js +90 -0
- package/esm/webpackLoaders/polyfills/fsPolyfill.d.ts +78 -0
- package/esm/webpackLoaders/{worker/polyfills → polyfills}/fsPolyfill.js +154 -191
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.d.ts +26 -0
- package/esm/webpackLoaders/polyfills/fsPromisesPolyfill.js +112 -0
- package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.d.ts +0 -2
- package/esm/webpackLoaders/{worker/polyfills → polyfills}/nodePolyFills.js +4 -3
- package/esm/webpackLoaders/{worker/type.d.ts → types.d.ts} +1 -0
- package/esm/webpackLoaders/{worker/index.js → worker.js} +8 -3
- package/esm/worker.js +2 -2
- package/package.json +14 -13
- package/esm/internalProject.js +0 -110
- package/esm/loaderWorkerPool.d.ts +0 -3
- package/esm/loaderWorkerPool.js +0 -125
- package/esm/sabcom.d.ts +0 -31
- package/esm/sabcom.js +0 -71
- package/esm/type.js +0 -12
- package/esm/webpackLoaders/loaders/less-loader/index.d.ts +0 -3
- package/esm/webpackLoaders/loaders/less-loader/index.js +0 -103
- package/esm/webpackLoaders/loaders/less-loader/options.json +0 -67
- package/esm/webpackLoaders/loaders/less-loader/utils.d.ts +0 -14
- package/esm/webpackLoaders/loaders/less-loader/utils.js +0 -217
- package/esm/webpackLoaders/worker/polyfills/fastGlobPolyfill.d.ts +0 -2
- package/esm/webpackLoaders/worker/polyfills/fastGlobPolyfill.js +0 -48
- package/esm/webpackLoaders/worker/polyfills/fsPolyfill.d.ts +0 -124
- package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.d.ts +0 -9
- package/esm/webpackLoaders/worker/polyfills/fsPromisesPolyfill.js +0 -9
- /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/{worker/cjs.d.ts → cjs.d.ts} +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.d.ts +0 -0
- /package/esm/webpackLoaders/{worker/polyfills → polyfills}/workerThreadsPolyfill.js +0 -0
- /package/esm/webpackLoaders/{worker/type.js → types.js} +0 -0
- /package/esm/webpackLoaders/{worker/index.d.ts → worker.d.ts} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @utoo/web
|
|
2
|
+
|
|
3
|
+
> 🌖 Web-compatible version of the Utoo toolchain, powered by [Turbopack](https://turbo.build/pack) and WebAssembly.
|
|
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 real file system and dependency management, entirely within the browser.
|
|
6
|
+
|
|
7
|
+
## ✨ Features
|
|
8
|
+
|
|
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.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 📦 Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @utoo/web
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## 🛠️ Development
|
|
24
|
+
|
|
25
|
+
### Prerequisites
|
|
26
|
+
|
|
27
|
+
- Rust toolchain (nightly)
|
|
28
|
+
- `wasm-bindgen-cli`
|
|
29
|
+
- `binaryen` (for `wasm-opt`)
|
|
30
|
+
|
|
31
|
+
### Build
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# Install toolchain
|
|
35
|
+
npm run install-toolchain
|
|
36
|
+
|
|
37
|
+
# Build WASM and TypeScript
|
|
38
|
+
npm run build
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Run Demo
|
|
42
|
+
|
|
43
|
+
To run the web demo:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm start -w utooweb-demo
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 📚 Documentation
|
|
50
|
+
|
|
51
|
+
For detailed API usage and examples, please refer to the [API Documentation](./API.md) ([中文版](./API_zh-CN.md)).
|
|
52
|
+
|
|
53
|
+
## �📄 License
|
|
54
|
+
|
|
55
|
+
[MIT](./LICENSE)
|
|
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";
|