{"name":"@utoo/pack","version":"1.1.9","license":"MIT","_id":"@utoo/pack@1.1.9","maintainers":[{"name":"afc163","email":"afc163@gmail.com"},{"name":"elrrrrrrr","email":"elrrrrrrr@gmail.com"},{"name":"xusd320","email":"xusd320@gmail.com"},{"name":"zoomdong07","email":"zoomdong07@gmail.com"}],"homepage":"https://github.com/utooland/utoo#readme","bugs":{"url":"https://github.com/utooland/utoo/issues"},"dist":{"shasum":"50cea76ced9466c8e7768c397d529e6164df3940","tarball":"http://registry-npm.ywwl.com/@utoo/pack/download/@utoo/pack-1.1.9.tgz","fileCount":75,"integrity":"sha512-DbGsxUbQxt+Xhnbh3MkucKzot8QV6IqWgKgaKoW4yE5CbaTf2jRKGsV1gMt2QtC9/Lng5p6K3AV+YcGZBnIxBQ==","signatures":[{"sig":"MEYCIQDELaBtvAOk3hjgfUWczN6UdfC3/Tz9YS/VsGEiKPgzJAIhAM5UQPXLDuzOBzBYIVgx2N6T2GulVfAFlsMmj8ity0Hd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":247439,"size":34680,"noattachment":false,"key":"/@utoo/pack/-/@utoo/pack-1.1.9.tgz"},"main":"cjs/index.js","napi":{"name":"pack","triples":{"defaults":false,"additional":["aarch64-apple-darwin","x86_64-apple-darwin","aarch64-unknown-linux-gnu","aarch64-unknown-linux-musl","x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","x86_64-pc-windows-msvc"]}},"types":"esm/index.d.ts","module":"esm/index.js","engines":{"node":">= 20"},"exports":{".":{"types":"./esm/index.d.ts","import":"./esm/index.js","require":"./cjs/index.js"},"./cjs/*":"./cjs/*","./esm/*":"./esm/*","./package.json":"./package.json","./config_schema.json":"./config_schema.json"},"gitHead":"722063f971198c35d6bdedc2fb844e83f78cf0d6","scripts":{"build":"npm run build:binding && npm run build:cjs && npm run build:esm","clean":"rm -rf cjs esm","version":"napi version","build:js":"npm run build:cjs && npm run build:esm","artifacts":"napi artifacts --dir ./src --dist npm","build:cjs":"rm -rf cjs && tsc -p ./tsconfig.json --module commonjs --outDir cjs && cp src/*.d.ts cjs/","build:esm":"rm -rf esm && tsc -p ./tsconfig.json --module esnext --outDir esm && cp src/*.d.ts esm/","build:local":"npm run build:binding:local && npx turbo run build --filter=@utoo/pack-shared && npm run build:cjs && npm run build:esm && cp src/*.node cjs/ && cp src/*.node esm/","build:binding":"napi build src --platform --release -p pack-napi --cargo-cwd ../../ --cargo-name pack_napi --features plugin --js binding.js --dts binding.d.ts","prepublishOnly":"npm run build:js && napi prepublish -t npm --skip-gh-release","build:binding:local":"napi build src --platform --profile release-local -p pack-napi --cargo-cwd ../../ --cargo-name pack_napi --features plugin --js binding.js --dts binding.d.ts","generate-features-list":"node ./scripts/generate-feature-list.js"},"_npmUser":{"name":"zoomdong07","email":"zoomdong07@gmail.com"},"repository":{"url":"git+ssh://git@github.com/utooland/utoo.git","type":"git"},"_npmVersion":"10.9.4","description":"> 🌖 High-performance bundler core for the Utoo toolchain, powered by [Turbopack](https://turbo.build/pack).","directories":{},"_nodeVersion":"22.21.1","dependencies":{"ws":"^8.18.1","less":"^4.0.0","sass":"1.54.0","send":"0.17.1","nanoid":"^3.3.11","find-up":"4.1.0","postcss":"8.4.31","picocolors":"^1.1.1","less-loader":"^12.0.0","sass-loader":"^13.2.0","@swc/helpers":"0.5.15","domparser-rs":"^0.0.5","loader-runner":"^4.3.0","@babel/code-frame":"7.22.5","@utoo/pack-shared":"^1.1.9","@utoo/style-loader":"^1.0.0","resolve-url-loader":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/ws":"^8.18.1","styled-jsx":"^5.1.6","typescript":"^5.8.3","@types/mime":"^3.0.4","@types/node":"^20.3.0","@types/send":"0.14.4","@napi-rs/cli":"^2.18.0","@types/mime-types":"3.0.1","@types/babel__code-frame":"7.0.2"},"peerDependencies":{"@types/webpack":"^5.28.5"},"optionalDependencies":{"@utoo/pack-darwin-x64":"1.1.9","@utoo/pack-darwin-arm64":"1.1.9","@utoo/pack-linux-x64-gnu":"1.1.9","@utoo/pack-linux-x64-musl":"1.1.9","@utoo/pack-win32-x64-msvc":"1.1.9","@utoo/pack-linux-arm64-gnu":"1.1.9","@utoo/pack-linux-arm64-musl":"1.1.9"},"_npmOperationalInternal":{"tmp":"tmp/pack_1.1.9_1766547282104_0.3641056732942425","host":"s3://npm-registry-packages-npm-production"},"readme":"# @utoo/pack\n\n> 🌖 High-performance bundler core for the Utoo toolchain, powered by [Turbopack](https://turbo.build/pack).\n\n`@utoo/pack` is the engine behind the Utoo build system. It leverages the incremental computation power of Turbopack and the performance of Rust to provide a lightning-fast development and build experience.\n\n## ✨ Key Features\n\n- ⚡ **Extreme Performance**: Core bundling logic implemented in Rust via NAPI-RS.\n- 🛠️ **Turbopack Powered**: Built on top of the same engine that powers Next.js Turbopack.\n- 🔌 **Webpack Compatibility**: Support for consuming `webpack.config.js` to simplify migration from Webpack.\n- 📦 **Modern Web Support**: Native support for TypeScript, JSX, CSS Modules, Less, Sass, and more.\n- 🔧 **Extensible Architecture**: Support for custom loaders, plugins, and flexible configuration.\n- 🔄 **Fast HMR**: Instant updates during development with optimized Hot Module Replacement.\n\n## ✨ Supported Features\n\n`@utoo/pack` aims for high compatibility with the Webpack ecosystem while providing superior performance.\n\n- **Entry**: Supports `name`, `import`, and `filename` templates.\n- **Module Rules**: Support for most mainstream Webpack loaders via `loader-runner`.\n- **Resolve**: Full support for `alias` and `extensions`.\n- **Styles**: Built-in support for Less, Sass, PostCSS, CSS Modules, and LightningCSS.\n- **Optimization**: Minification, Tree Shaking, Module Concatenation, and more.\n- **Frameworks**: Optimized for React (including `styled-jsx`, `styled-components`).\n- **Tools**: Integrated Bundle Analyzer and Tracing Logs.\n\n> [!TIP]\n> For a detailed status of all features, see the [Features List](./docs/features-list.md).\n\n## 📦 Installation\n\n```bash\nut install @utoo/pack --save-dev\n```\n\n## 🚀 Quick Start\n\n### Programmatic API\n\nYou can use `@utoo/pack` directly in your Node.js scripts:\n\n```javascript\nconst { build, dev } = require('@utoo/pack');\n\n// Production build\nasync function runBuild() {\n  await build({\n    config: {\n      entry: [\n        {\n          import: \"./src/index.ts\",\n          html: {\n            template: \"./index.html\"\n          }\n        }\n      ],\n      output: {\n        path: \"./dist\",\n        filename: \"[name].[contenthash:8].js\",\n        chunkFilename: \"[name].[contenthash:8].js\",\n        clean: true\n      },\n      sourceMaps: true\n    }\n  });\n}\n\n// Development mode with HMR\nasync function startDev() {\n  const server = await dev({\n    config: {\n      entry: [\n        {\n          import: \"./src/index.ts\",\n          html: {\n            template: \"./index.html\"\n          }\n        }\n      ],\n      output: {\n        path: \"./dist\",\n        filename: \"[name].[contenthash:8].js\",\n        chunkFilename: \"[name].[contenthash:8].js\",\n        clean: true\n      },\n      sourceMaps: true\n    }\n  });\n}\n```\n\n## 🔌 Webpack Compatibility Mode\n\n`@utoo/pack` provides a partial compatibility layer for Webpack.\n\n```javascript\nconst { build } = require('@utoo/pack');\nconst webpackConfig = require('./webpack.config.js');\n\nasync function run() {\n  await build({ ...webpackConfig, webpackMode: true });\n}\n```\n\n> [!NOTE]\n> Not all Webpack features and plugins are supported. Check the [Features List](./docs/features-list.md) for details on supported configuration options.\n\n## ⚙️ Configuration\n\nThe bundler can be configured via a `utoopack.json` or through the programmatic API. Key configuration areas include:\n\n- **`entry`**: Define your application entry points.\n- **`define`**: Build-time variable replacement.\n- **`externals`**: Exclude specific dependencies from the bundle.\n- **`server.externals`**: Replace top-level externals for server entries and Server Functions. If\n  omitted, server builds continue to use top-level `externals`.\n- **`devServer.browserToTerminal`**: Forward browser console output to the development terminal.\n  Use `\"error\"`, `\"warn\"`, `true`, or `false`; standalone Utoopack defaults to `false`.\n- **`mode`**: `development` or `production`.\n\nFor a full list of options, see the [Configuration Schema](./config_schema.json).\n\n## 🛠️ Development\n\n### Prerequisites\n\n- **Rust**: Nightly toolchain (see [rust-toolchain.toml](../../rust-toolchain.toml)).\n- **Node.js**: Version 20 or higher.\n\n### Building from Source\n\n```bash\n# Build Rust bindings and TypeScript modules\nnpm run build\n```\n\n## 📄 License\n\n[MIT](./LICENSE)\n","publish_time":1766547282243,"_cnpm_publish_time":1766547282243,"dist-tags":{"alpha":"1.5.38-alpha.0","latest":"1.5.39","lingguang":"1.1.7-lingguang","rc":"1.2.10-rc.2"}}