diff --git a/packages/quickjs-emscripten-core/README.md b/packages/quickjs-emscripten-core/README.md index 99469744..23f58fed 100644 --- a/packages/quickjs-emscripten-core/README.md +++ b/packages/quickjs-emscripten-core/README.md @@ -43,18 +43,18 @@ You can provide your own variant to control exactly how the large WebAssembly ob You can use [subpath imports in package.json](https://nodejs.org/api/packages.html#subpath-imports) to select the appropriate variant for a runtime. This is how the main `quickjs-emscripten` package picks between browser, Node ESM and Node CommonJS variants. -```json5 +```json // in your package.json { - imports: { + "imports": { "#my-quickjs-variant": { - types: "@jitl/quickjs-wasmfile-release-sync", + "types": "@jitl/quickjs-wasmfile-release-sync", // In the browser, use the singlefile variant that doesn't need an external file - browser: "@jitl/quickjs-singlefile-browser-release-sync", + "browser": "@jitl/quickjs-singlefile-browser-release-sync", // Otherwise, use the wasmfile variant, compatible with all environments - default: "@jitl/quickjs-wasmfile-release-sync", - }, - }, + "default": "@jitl/quickjs-wasmfile-release-sync" + } + } } ``` diff --git a/packages/quickjs-emscripten-core/README.template.md b/packages/quickjs-emscripten-core/README.template.md index 2f99436e..07644382 100644 --- a/packages/quickjs-emscripten-core/README.template.md +++ b/packages/quickjs-emscripten-core/README.template.md @@ -43,7 +43,7 @@ You can provide your own variant to control exactly how the large WebAssembly ob You can use [subpath imports in package.json](https://nodejs.org/api/packages.html#subpath-imports) to select the appropriate variant for a runtime. This is how the main `quickjs-emscripten` package picks between browser, Node ESM and Node CommonJS variants. -```json5 +```json // in your package.json { "imports": {