Parcel 文件
開始使用
瞭解如何開始一個新專案,或將現有專案移轉到 Parcel 2。
Building a webapp with Parcel
Learn how to set up a new web application from scratch with Parcel.
Building a library with Parcel
Learn how to set up a Parcel to build a JavaScript library.
Migration
Migrate an existing project from Parcel 1 to Parcel 2.
功能
瞭解 Parcel 的核心功能。
Development
Learn about Parcel's dev server, hot reloading, lazy mode, caching, and more.
Code Splitting
How to use dynamic imports and Parcel's automatic shared bundles.
Resolution
How dependencies are resolved, url schemes, aliases, and more.
Bundle Inlining
How to inline the compiled contents of one bundle inside another.
Targets
How to compile your source code for multiple targets.
Production
Minification, tree shaking, compression, content hashing, and more.
Scope hoisting
Dig into the details of how Parcel's tree shaking implementation works.
Node emulation
Using Node.js features like environment variables and builtin module polyfills.
CLI
A reference for all of the options available in the Parcel CLI.
Parcel API
Run Parcel builds programmatically to integrate into any build.
Plugins
Overriding and extending Parcel's defaults using plugins.
語言和架構
瞭解如何使用 Parcel 搭配最常見的語言和架構。請參閱側邊導覽,取得更多資訊。
HTML
The entry of most Parcel apps. From here, you can reference scripts, styles, images, and more.
JavaScript
Using ES modules and CommonJS, setting up transpilation, JSX, workers, and more.
CSS
Using CSS with Parcel, including dependencies, CSS modules, PostCSS, and more.
SVG
Referencing SVG from HTML, CSS, JavaScript, and JSX, including scripts and styles, and more.
TypeScript
Using TypeScript with Parcel, including transpilation and generating typings.
Images
Resizing, converting, and optimizing images.
React
Using React with Parcel, including Fast Refresh, styling, images, code splitting, and more.
Vue
Using Vue 3 SFCs with Parcel.
外掛系統
瞭解如何使用自己的外掛自訂和擴充 Parcel 的預設值。
概念
Plugin System
An overview of Parcel's architecture and core data structures.
Authoring Plugins
An introduction to Parcel's Plugin APIs, and a guide to publishing a plugin package.
Diagnostics
How to emit errors and logs using Parcel's unified diagnostics format.
Source Maps
How to work with Parcel's source maps library in your plugin.
外掛類型
Transformer
Compile individual source files and extract dependencies.
Resolver
Resolve a dependency to a file path or virtual module.
Namer
Determine the name of an output file.
Packager
Combine multiple assets together into a single output file.
Optimizer
Minify, optimize, and transform output files.
Compressor
Compress and encode output files in multiple formats.
Reporter
Receive events on build progress and completion.
Configuration
Share Parcel configuration between projects.