diff --git a/src/features/targets.md b/src/features/targets.md index c07b38519..bbb9c1c99 100644 --- a/src/features/targets.md +++ b/src/features/targets.md @@ -115,7 +115,7 @@ For Node.js and other targets, the `engines` field in package.json can be used t When one file depends on another, the environment is inherited from its parent. But how you depend on the asset can change some properties of the environment. For example, when depending on a service worker, the environment is automatically changed into a service worker context so that the code is compiled appropriately. ```javascript -navigator.serviceWorker.register(new URL('service-worker.js', import.meta.url)); +navigator.serviceWorker.register(new URL("service-worker.js", import.meta.url)); ``` ### Differential bundling @@ -224,7 +224,13 @@ See [Building a library with Parcel](/getting-started/library/) for an intro to ### `context` ```javascript -'node' | 'browser' | 'web-worker' | 'service-worker' | 'worklet' | 'electron-main' | 'electron-renderer' +"node" | + "browser" | + "web-worker" | + "service-worker" | + "worklet" | + "electron-main" | + "electron-renderer"; ``` The `context` property defines what type of environment to build for. This tells Parcel what environment-specific APIs are available, e.g. the DOM, Node filesystem APIs, etc. @@ -238,7 +244,7 @@ Overrides the engines defined in the top-level `package.json#engines` and `brows ### `outputFormat` ```javascript -'global' | 'esmodule' | 'commonjs' +"global" | "esmodule" | "commonjs" | "amd"; ``` Defines what type of module to output. @@ -246,6 +252,7 @@ Defines what type of module to output. - `global` – a classic script that could be loaded in a `