├── .gitignore ├── README.md ├── cjs ├── test-cjs.js ├── test-esm.js ├── test-folder.js └── test-mixed.js ├── esm ├── test-cjs.mjs ├── test-esm.mjs ├── test-folder.mjs └── test-mixed.mjs ├── examples ├── rollup │ ├── dist │ │ ├── index.cjs │ │ └── index.mjs │ ├── package.json │ ├── rollup.config.js │ └── src │ │ └── index.js ├── tsc │ ├── dist │ │ ├── esm │ │ │ ├── index.js │ │ │ └── package.json │ │ └── index.js │ ├── package.json │ ├── src │ │ └── index.ts │ ├── tsconfig.cjs.json │ ├── tsconfig.esm.json │ └── tsconfig.json ├── tsup │ ├── dist │ │ ├── index.cjs │ │ └── index.js │ ├── package.json │ ├── src │ │ └── index.js │ └── tsup.config.js └── vite │ ├── dist │ ├── index.js │ └── index.mjs │ ├── package.json │ ├── src │ └── index.js │ └── vite.config.js ├── package.json ├── packages ├── test-cjs │ ├── index.cjs.js │ ├── index.esm.js │ └── package.json ├── test-esm │ ├── index.cjs.js │ ├── index.esm.js │ └── package.json ├── test-folder │ ├── esm │ │ ├── index.js │ │ └── package.json │ ├── index.js │ └── package.json └── test-mixed │ ├── index.cjs │ ├── index.mjs │ └── package.json ├── pnpm-lock.yaml └── pnpm-workspace.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Node "exports", "module" fields explanation 2 | 3 | Node doesn't allow using `.js` extension for both `esm` and `commonjs` files in the same project when importing files _from_ that project. This is why this `exports` field is **BAD**: 4 | 5 | ```json 6 | { 7 | "exports": { 8 | ".": { 9 | "import": "./index.esm.js", 10 | "require": "./index.cjs.js" 11 | } 12 | } 13 | } 14 | ``` 15 | 16 | Node also doesn't support "module" field by its resolution algorithm (this is bundlers convention that wasn't officially adopted by Node), so it is highly encouraged to use "exports" field alongside "module" field for the older bundlers. In the examples bellow only "exports" field is used. 17 | 18 | ## Prerequisite 19 | 20 | We have 4 packages: 21 | 22 | - **test-cjs** is a commonjs package that has incorrect `exports` field for "import" files (has `.js` extension) 23 | - **test-esm** is a esm pckage that has incorrect `exports` field for "require" files (has `.js` extension) 24 | - **test-mixed** is commonjs package that has correct `exports` field for "import" and "require" files (has `.mjs` and `.cjs` extensions) 25 | - **test-folder** is a commonjs package that has correct `exports` field for "import" and "require" files (has `.js` extension, but `esm` is inside `/esm` folder with near `package.json` having `"type": "module"`) 26 | 27 | ## Examples 28 | 29 | > Run `pnpm install` before running examples 30 | 31 | When running this package, you will get an error, depending on its `type` field: 32 | 33 | - run `node cjs/test-esm.js` to get `require() of ES modules is not supported` error (cjs `requires` cjs-like file inside esm package) 34 | 35 | - which means you can only use `import` syntax with this module in Node 36 | - example: when running `node esm/test-esm.mjs`, you will not get an error (esm `imports` esm) 37 | 38 | - run `node esm/test-cjs.mjs` to get `The requested module 'test-cjs' is a CommonJS module` error (esm `imports` esm-like file inside cjs package) 39 | 40 | - which means you can only use `require` syntax with this module in Node 41 | - example: when running `node cjs/test-cjs.js`, you will not get an error (cjs `requires` cjs) 42 | 43 | - if you run `node cjs/test-mixed.js` or `node esm/test-mixed.mjs` you will see no errors because it has correct `exports` field. 44 | - if you run `node cjs/test-folder.js` or `node esm/test-folder.mjs` you will see no errors because it has correct `exports` field, and `esm` file has a `package.json` near it with `"type": "module"`. 45 | 46 | To fix this, bundle your files with appropriate extensions: 47 | 48 | 1. If your package doesn't have `"type"` in your `package.json`, use `.cjs`/`.js` extensions, when files have `commonjs` syntax, and `.mjs` extension for files with `esm` syntax 49 | 50 | ```jsonc 51 | { 52 | "exports": { 53 | ".": { 54 | "import": "./index.mjs", 55 | "require": "./index.js" // or "./index.cjs" 56 | } 57 | } 58 | } 59 | ``` 60 | 61 | 2. If your package has `"type": "commonjs"` in your `package.json`, use `.cjs`/`.js` extensions, when files have `commonjs` syntax, and `.mjs` extension for files with `esm` syntax 62 | 63 | ```jsonc 64 | { 65 | "type": "commonjs", 66 | "exports": { 67 | ".": { 68 | "import": "./index.mjs", 69 | "require": "./index.js" // or "./index.cjs" 70 | } 71 | } 72 | } 73 | ``` 74 | 75 | 3. If your package has `"type": "module"` in your `package.json`, use `.cjs` extension, when files have `commonjs` syntax, and `.mjs`/`.js` extension for files with `esm` syntax 76 | 77 | ```jsonc 78 | { 79 | "type": "module", 80 | "exports": { 81 | ".": { 82 | "import": "./index.js", // or "./index.mjs" 83 | "require": "./index.cjs" 84 | } 85 | } 86 | } 87 | ``` 88 | 89 | 4. If your bundler doesn't allow mixing extensions, you can build `esm` files inside `/esm` folder and put a `package.json` with `"type": "module"` inside. 90 | 91 | `package.json` in the root: 92 | 93 | ```jsonc 94 | { 95 | "exports": { 96 | ".": { 97 | "import": "./esm/index.js", 98 | "require": "./index.js" 99 | } 100 | } 101 | } 102 | ``` 103 | 104 | `package.json` in `/esm`: 105 | 106 | ```jsonc 107 | { 108 | "type": "module" 109 | } 110 | ``` 111 | 112 | > Warning: These examples work with Webpack/Rollup/Vite and other bundler's pipelines because they don't _run_ these files, they only read and analyze them, but they will **FAIL** when run inside Node by tools like Vitest, SSR or manually. 113 | 114 | To build you project correctly, use one of these configs (you can see this in `examples` folder): 115 | 116 | ## rollup.config.js 117 | 118 | ```js 119 | export default { 120 | input: "src/index.js", 121 | output: [ 122 | { 123 | file: "dist/index.cjs", 124 | format: "cjs", 125 | }, 126 | { 127 | file: "dist/index.mjs", 128 | format: "esm", 129 | }, 130 | ], 131 | }; 132 | ``` 133 | 134 | ## webpack.config.js 135 | 136 | > TODO 137 | 138 | ## vite.config.js 139 | 140 | ```js 141 | export default { 142 | build: { 143 | lib: { 144 | entry: path.resolve(__dirname, "src/index.js"), 145 | name: "MyName", 146 | fileName: (format) => `index.${format == "es" ? "mjs" : "js"}`, 147 | }, 148 | }, 149 | }; 150 | ``` 151 | 152 | ## tsup.config.js 153 | 154 | ```js 155 | export default { 156 | entry: ["src/index.js"], 157 | format: ["esm", "cjs"], 158 | }; 159 | ``` 160 | 161 | ## using tsc 162 | 163 | This will create `dist` folder with commonjs files, and `esm` folder inside with esm files. 164 | 165 | You will need two `tsconfig.json` configs: 166 | 167 | ```jsonc 168 | // tsconfig.cjs.json 169 | { 170 | "extends": "./tsconfig.json", 171 | "compilerOptions": { 172 | "module": "commonjs", 173 | "outDir": "dist", 174 | "target": "es2015" 175 | } 176 | } 177 | ``` 178 | 179 | ```jsonc 180 | // tsconfig.esm.json 181 | { 182 | "extends": "./tsconfig.json", 183 | "compilerOptions": { 184 | "module": "esnext", 185 | "outDir": "dist/esm", 186 | "target": "esnext" 187 | } 188 | } 189 | ``` 190 | 191 | Run these command to generate `dist`: 192 | 193 | ```bash 194 | $ tsc -p tsconfig.cjs.json 195 | $ tsc -p tsconfig.esm.json 196 | ``` 197 | 198 | Then you need to put `package.json` with `"type": "module"` inside `dist/esm` folder. You can do it in several ways, but the easiest would be running this command: 199 | 200 | ```bash 201 | $ echo >dist/esm/package.json "{\"type\":\"module\"}" 202 | ``` 203 | 204 | # See also 205 | 206 | - [Dual CommonJS/ES module packages in official Node.js documentation](https://nodejs.org/api/packages.html#dual-commonjses-module-packages) 207 | - [Publish ESM and CJS in a single package](https://antfu.me/posts/publish-esm-and-cjs) by [Anthony Fu](https://github.com/antfu) 208 | - [How to Create a Hybrid NPM Module for ESM and CommonJS](https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html) on SenseDeep 209 | - [publint](https://publint.bjornlu.com/) tool to check if package is published right, by [Bjorn Lu](https://bjornlu.com/) 210 | -------------------------------------------------------------------------------- /cjs/test-cjs.js: -------------------------------------------------------------------------------- 1 | const {test} = require('test-cjs') 2 | console.log(test) -------------------------------------------------------------------------------- /cjs/test-esm.js: -------------------------------------------------------------------------------- 1 | const {test} = require('test-esm') 2 | console.log(test) -------------------------------------------------------------------------------- /cjs/test-folder.js: -------------------------------------------------------------------------------- 1 | const {test} = require('test-folder') 2 | console.log(test) -------------------------------------------------------------------------------- /cjs/test-mixed.js: -------------------------------------------------------------------------------- 1 | const {test} = require('test-mixed') 2 | console.log(test) -------------------------------------------------------------------------------- /esm/test-cjs.mjs: -------------------------------------------------------------------------------- 1 | import {test} from 'test-cjs' 2 | console.log(test) -------------------------------------------------------------------------------- /esm/test-esm.mjs: -------------------------------------------------------------------------------- 1 | import {test} from 'test-esm' 2 | console.log(test) -------------------------------------------------------------------------------- /esm/test-folder.mjs: -------------------------------------------------------------------------------- 1 | import {test} from 'test-folder' 2 | console.log(test) -------------------------------------------------------------------------------- /esm/test-mixed.mjs: -------------------------------------------------------------------------------- 1 | import {test} from 'test-mixed' 2 | console.log(test) -------------------------------------------------------------------------------- /examples/rollup/dist/index.cjs: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | Object.defineProperty(exports, '__esModule', { value: true }); 4 | 5 | const example = "rollup"; 6 | 7 | exports.example = example; 8 | -------------------------------------------------------------------------------- /examples/rollup/dist/index.mjs: -------------------------------------------------------------------------------- 1 | const example = "rollup"; 2 | 3 | export { example }; 4 | -------------------------------------------------------------------------------- /examples/rollup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-rollup", 3 | "type": "module", 4 | "scripts": { 5 | "build": "rollup -c" 6 | }, 7 | "exports": { 8 | ".": { 9 | "import": "./dist/index.mjs", 10 | "require": "./dist/index.cjs" 11 | } 12 | }, 13 | "devDependencies": { 14 | "rollup": "^2.70.1" 15 | } 16 | } -------------------------------------------------------------------------------- /examples/rollup/rollup.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | input: "src/index.js", 3 | output: [ 4 | { 5 | file: "dist/index.cjs", 6 | format: "cjs", 7 | }, 8 | { 9 | file: "dist/index.mjs", 10 | format: "esm", 11 | }, 12 | ], 13 | }; 14 | -------------------------------------------------------------------------------- /examples/rollup/src/index.js: -------------------------------------------------------------------------------- 1 | export const example = "rollup"; 2 | -------------------------------------------------------------------------------- /examples/tsc/dist/esm/index.js: -------------------------------------------------------------------------------- 1 | export const example = "tsc"; 2 | -------------------------------------------------------------------------------- /examples/tsc/dist/esm/package.json: -------------------------------------------------------------------------------- 1 | {"type":"module"} 2 | -------------------------------------------------------------------------------- /examples/tsc/dist/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.example = void 0; 4 | exports.example = "tsc"; 5 | -------------------------------------------------------------------------------- /examples/tsc/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-vite", 3 | "type": "commonjs", 4 | "scripts": { 5 | "build:cjs": "tsc -p tsconfig.cjs.json", 6 | "build:esm": "tsc -p tsconfig.esm.json && echo >dist/esm/package.json \"{\\\"type\\\":\\\"module\\\"}\"", 7 | "build": "npm run build:cjs && npm run build:esm" 8 | }, 9 | "exports": { 10 | ".": { 11 | "import": "./dist/esm/index.js", 12 | "require": "./dist/index.js" 13 | } 14 | }, 15 | "dependencies": { 16 | "typescript": "^4.6.3" 17 | } 18 | } -------------------------------------------------------------------------------- /examples/tsc/src/index.ts: -------------------------------------------------------------------------------- 1 | export const example = "tsc"; 2 | -------------------------------------------------------------------------------- /examples/tsc/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "module": "commonjs", 5 | "outDir": "dist", 6 | "target": "es2015" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/tsc/tsconfig.esm.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "module": "esnext", 5 | "outDir": "dist/esm", 6 | "target": "esnext" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/tsc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": "src", 4 | "moduleResolution": "node", 5 | "listEmittedFiles": false, 6 | "listFiles": false, 7 | "skipLibCheck": true, 8 | "strict": true, 9 | "declaration": false 10 | }, 11 | "exclude": ["node_modules", "dist"] 12 | } 13 | -------------------------------------------------------------------------------- /examples/tsup/dist/index.cjs: -------------------------------------------------------------------------------- 1 | var __defProp = Object.defineProperty; 2 | var __getOwnPropDesc = Object.getOwnPropertyDescriptor; 3 | var __getOwnPropNames = Object.getOwnPropertyNames; 4 | var __hasOwnProp = Object.prototype.hasOwnProperty; 5 | var __export = (target, all) => { 6 | for (var name in all) 7 | __defProp(target, name, { get: all[name], enumerable: true }); 8 | }; 9 | var __copyProps = (to, from, except, desc) => { 10 | if (from && typeof from === "object" || typeof from === "function") { 11 | for (let key of __getOwnPropNames(from)) 12 | if (!__hasOwnProp.call(to, key) && key !== except) 13 | __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); 14 | } 15 | return to; 16 | }; 17 | var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); 18 | 19 | // src/index.js 20 | var src_exports = {}; 21 | __export(src_exports, { 22 | example: () => example 23 | }); 24 | module.exports = __toCommonJS(src_exports); 25 | var example = "tsup"; 26 | // Annotate the CommonJS export names for ESM import in node: 27 | 0 && (module.exports = { 28 | example 29 | }); 30 | -------------------------------------------------------------------------------- /examples/tsup/dist/index.js: -------------------------------------------------------------------------------- 1 | // src/index.js 2 | var example = "tsup"; 3 | export { 4 | example 5 | }; 6 | -------------------------------------------------------------------------------- /examples/tsup/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-tsup", 3 | "type": "module", 4 | "scripts": { 5 | "build": "tsup" 6 | }, 7 | "exports": { 8 | ".": { 9 | "import": "./dist/index.js", 10 | "require": "./dist/index.cjs" 11 | } 12 | }, 13 | "devDependencies": { 14 | "tsup": "^5.12.4" 15 | } 16 | } -------------------------------------------------------------------------------- /examples/tsup/src/index.js: -------------------------------------------------------------------------------- 1 | export const example = "tsup"; 2 | -------------------------------------------------------------------------------- /examples/tsup/tsup.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | entry: ["src/index.js"], 3 | format: ["esm", "cjs"], 4 | }; 5 | -------------------------------------------------------------------------------- /examples/vite/dist/index.js: -------------------------------------------------------------------------------- 1 | (function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["vite-example"]={}))})(this,function(e){"use strict";const t="vite";e.example=t,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); 2 | -------------------------------------------------------------------------------- /examples/vite/dist/index.mjs: -------------------------------------------------------------------------------- 1 | const example = "vite"; 2 | export { example }; 3 | -------------------------------------------------------------------------------- /examples/vite/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example-vite", 3 | "type": "commonjs", 4 | "scripts": { 5 | "build": "vite build" 6 | }, 7 | "exports": { 8 | ".": { 9 | "import": "./dist/index.mjs", 10 | "require": "./dist/index.js" 11 | } 12 | }, 13 | "devDependencies": { 14 | "vite": "^2.9.1" 15 | } 16 | } -------------------------------------------------------------------------------- /examples/vite/src/index.js: -------------------------------------------------------------------------------- 1 | export const example = "vite"; 2 | -------------------------------------------------------------------------------- /examples/vite/vite.config.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | module.exports = { 4 | build: { 5 | lib: { 6 | entry: path.resolve(__dirname, "src/index.js"), 7 | name: "vite-example", 8 | fileName: (format) => `index.${format == "es" ? "mjs" : "js"}`, 9 | }, 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dual-packaging", 3 | "version": "1.0.0", 4 | "description": "", 5 | "author": "", 6 | "license": "ISC", 7 | "dependencies": { 8 | "test-cjs": "workspace:*", 9 | "test-esm": "workspace:*", 10 | "test-mixed": "workspace:*", 11 | "test-folder": "workspace:*" 12 | } 13 | } -------------------------------------------------------------------------------- /packages/test-cjs/index.cjs.js: -------------------------------------------------------------------------------- 1 | console.log('cjs module') 2 | 3 | module.exports.test = 'test' 4 | -------------------------------------------------------------------------------- /packages/test-cjs/index.esm.js: -------------------------------------------------------------------------------- 1 | console.log('esm module') 2 | 3 | export const test = 'test' -------------------------------------------------------------------------------- /packages/test-cjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-cjs", 3 | "type": "commonjs", 4 | "exports": { 5 | ".": { 6 | "import": "./index.esm.js", 7 | "require": "./index.cjs.js" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /packages/test-esm/index.cjs.js: -------------------------------------------------------------------------------- 1 | console.log('cjs module') 2 | 3 | module.exports.test = 'test' 4 | -------------------------------------------------------------------------------- /packages/test-esm/index.esm.js: -------------------------------------------------------------------------------- 1 | console.log('esm module') 2 | 3 | export const test = 'test' -------------------------------------------------------------------------------- /packages/test-esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-esm", 3 | "type": "module", 4 | "exports": { 5 | ".": { 6 | "import": "./index.esm.js", 7 | "require": "./index.cjs.js" 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /packages/test-folder/esm/index.js: -------------------------------------------------------------------------------- 1 | console.log('esm module') 2 | 3 | export const test = 'test' -------------------------------------------------------------------------------- /packages/test-folder/esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } -------------------------------------------------------------------------------- /packages/test-folder/index.js: -------------------------------------------------------------------------------- 1 | console.log('cjs module') 2 | 3 | module.exports.test = 'test' 4 | -------------------------------------------------------------------------------- /packages/test-folder/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-folder", 3 | "exports": { 4 | ".": { 5 | "import": "./esm/index.js", 6 | "require": "./index.js" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /packages/test-mixed/index.cjs: -------------------------------------------------------------------------------- 1 | console.log('cjs module') 2 | 3 | module.exports.test = 'test' 4 | -------------------------------------------------------------------------------- /packages/test-mixed/index.mjs: -------------------------------------------------------------------------------- 1 | console.log('esm module') 2 | 3 | export const test = 'test' -------------------------------------------------------------------------------- /packages/test-mixed/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test-mixed", 3 | "exports": { 4 | ".": { 5 | "import": "./index.mjs", 6 | "require": "./index.cjs" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: 5.3 2 | 3 | importers: 4 | 5 | .: 6 | specifiers: 7 | test-cjs: workspace:* 8 | test-esm: workspace:* 9 | test-folder: workspace:* 10 | test-mixed: workspace:* 11 | dependencies: 12 | test-cjs: link:packages/test-cjs 13 | test-esm: link:packages/test-esm 14 | test-folder: link:packages/test-folder 15 | test-mixed: link:packages/test-mixed 16 | 17 | examples/tsc: 18 | specifiers: 19 | typescript: ^4.6.3 20 | dependencies: 21 | typescript: 4.6.3 22 | 23 | examples/vite: 24 | specifiers: 25 | vite: ^2.9.1 26 | devDependencies: 27 | vite: 2.9.1 28 | 29 | packages/test-cjs: 30 | specifiers: {} 31 | 32 | packages/test-esm: 33 | specifiers: {} 34 | 35 | packages/test-folder: 36 | specifiers: {} 37 | 38 | packages/test-mixed: 39 | specifiers: {} 40 | 41 | packages: 42 | 43 | /esbuild-android-64/0.14.31: 44 | resolution: {integrity: sha512-MYkuJ91w07nGmr4EouejOZK2j/f5TCnsKxY8vRr2+wpKKfHD1LTJK28VbZa+y1+AL7v1V9G98ezTUwsV3CmXNw==} 45 | engines: {node: '>=12'} 46 | cpu: [x64] 47 | os: [android] 48 | requiresBuild: true 49 | dev: true 50 | optional: true 51 | 52 | /esbuild-android-arm64/0.14.31: 53 | resolution: {integrity: sha512-0rkH/35s7ZVcsw6nS0IAkR0dekSbjZGWdlOAf3jV0lGoPqqw0x6/TmaV9w7DQgUERTH1ApmPlpAMU4kVkCq9Jg==} 54 | engines: {node: '>=12'} 55 | cpu: [arm64] 56 | os: [android] 57 | requiresBuild: true 58 | dev: true 59 | optional: true 60 | 61 | /esbuild-darwin-64/0.14.31: 62 | resolution: {integrity: sha512-kP6xPZHxtJa36Hb0jC05L3VzQSZBW2f3bpnQS20czXTRGEmM2GDiYpGdI5g2QYaw6vC4PYXjnigq8usd9g9jnQ==} 63 | engines: {node: '>=12'} 64 | cpu: [x64] 65 | os: [darwin] 66 | requiresBuild: true 67 | dev: true 68 | optional: true 69 | 70 | /esbuild-darwin-arm64/0.14.31: 71 | resolution: {integrity: sha512-1ZMog4hkNsdBGtDDtsftUqX6S9N52gEx4vX5aVehsSptgoBFIar1XrPiBTQty7YNH+bJasTpSVaZQgElCVvPKQ==} 72 | engines: {node: '>=12'} 73 | cpu: [arm64] 74 | os: [darwin] 75 | requiresBuild: true 76 | dev: true 77 | optional: true 78 | 79 | /esbuild-freebsd-64/0.14.31: 80 | resolution: {integrity: sha512-Zo0BYj7QpVFWoUpkv6Ng0RO2eJ4zk/WDaHMO88+jr5HuYmxsOre0imgwaZVPquTuJnCvL1G48BFucJ3tFflSeQ==} 81 | engines: {node: '>=12'} 82 | cpu: [x64] 83 | os: [freebsd] 84 | requiresBuild: true 85 | dev: true 86 | optional: true 87 | 88 | /esbuild-freebsd-arm64/0.14.31: 89 | resolution: {integrity: sha512-t85bS6jbRpmdjr4pdr/FY/fpx8lo1vv9S7BAs2EsXKJQhRDMIiC3QW+k2acYJoRuqirlvJcJVFQGCq/PfyC1kA==} 90 | engines: {node: '>=12'} 91 | cpu: [arm64] 92 | os: [freebsd] 93 | requiresBuild: true 94 | dev: true 95 | optional: true 96 | 97 | /esbuild-linux-32/0.14.31: 98 | resolution: {integrity: sha512-XYtOk/GodSkv+UOYVwryGpGPuFnszsMvRMKq6cIUfFfdssHuKDsU9IZveyCG44J106J39ABenQ5EetbYtVJHUw==} 99 | engines: {node: '>=12'} 100 | cpu: [ia32] 101 | os: [linux] 102 | requiresBuild: true 103 | dev: true 104 | optional: true 105 | 106 | /esbuild-linux-64/0.14.31: 107 | resolution: {integrity: sha512-Zf9CZxAxaXWHLqCg/QZ/hs0RU0XV3IBxV+ENQzy00S4QOTnZAvSLgPciILHHrVJ0lPIlb4XzAqlLM5y6iI2LIw==} 108 | engines: {node: '>=12'} 109 | cpu: [x64] 110 | os: [linux] 111 | requiresBuild: true 112 | dev: true 113 | optional: true 114 | 115 | /esbuild-linux-arm/0.14.31: 116 | resolution: {integrity: sha512-RpiaeHPRlgCCDskxoyIsI49BhcDtZ4cl8+SLffizDm0yMNWP538SUg0ezQ2TTOPj3/svaGIbkRDwYtAon0Sjkg==} 117 | engines: {node: '>=12'} 118 | cpu: [arm] 119 | os: [linux] 120 | requiresBuild: true 121 | dev: true 122 | optional: true 123 | 124 | /esbuild-linux-arm64/0.14.31: 125 | resolution: {integrity: sha512-V/H0tv+xpQ9IOHM+o85oCKNNidIEc5CcnDWl0V+hPd2F03dqdbFkWPBGphx8rD4JSQn6UefUQ1iH7y1qIzO8Fw==} 126 | engines: {node: '>=12'} 127 | cpu: [arm64] 128 | os: [linux] 129 | requiresBuild: true 130 | dev: true 131 | optional: true 132 | 133 | /esbuild-linux-mips64le/0.14.31: 134 | resolution: {integrity: sha512-9/oBfAckInRuUg6AEgdCLLn6KJ6UOJDOLmUinTsReVSg6AfV6wxYQJq9iQM2idRogP7GUpomJ+bvCdWXpotQRQ==} 135 | engines: {node: '>=12'} 136 | cpu: [mips64el] 137 | os: [linux] 138 | requiresBuild: true 139 | dev: true 140 | optional: true 141 | 142 | /esbuild-linux-ppc64le/0.14.31: 143 | resolution: {integrity: sha512-NMcb14Pg+8q8raGkzor9/R3vQwKzgxE3694BtO2SDLBwJuL2C1dQ1ZtM1t7ZvArQBgT8RiZVxb0/3fD+qGNk7g==} 144 | engines: {node: '>=12'} 145 | cpu: [ppc64] 146 | os: [linux] 147 | requiresBuild: true 148 | dev: true 149 | optional: true 150 | 151 | /esbuild-linux-riscv64/0.14.31: 152 | resolution: {integrity: sha512-l13yvmsVfawAnoYfcpuvml+nTlrOmtdceXYufSkXl2DOb0JKcuR6ARlAzuQCDcpo49SOJy1cCxpwlOIsUQBfzA==} 153 | engines: {node: '>=12'} 154 | cpu: [riscv64] 155 | os: [linux] 156 | requiresBuild: true 157 | dev: true 158 | optional: true 159 | 160 | /esbuild-linux-s390x/0.14.31: 161 | resolution: {integrity: sha512-GIwV9mY3koYja9MCSkKLk1P7rj+MkPV0UsGsZ575hEcIBrXeKN9jBi6X/bxDDPEN/SUAH35cJhBNrZU4x9lEfg==} 162 | engines: {node: '>=12'} 163 | cpu: [s390x] 164 | os: [linux] 165 | requiresBuild: true 166 | dev: true 167 | optional: true 168 | 169 | /esbuild-netbsd-64/0.14.31: 170 | resolution: {integrity: sha512-bJ+pyLvKQm+Obp5k7/Wk8e9Gdkls56F1aiI3uptoIfOIUqsZImH7pDyTrSufwqsFp62kO9LRuwXnjDwQtPyhFQ==} 171 | engines: {node: '>=12'} 172 | cpu: [x64] 173 | os: [netbsd] 174 | requiresBuild: true 175 | dev: true 176 | optional: true 177 | 178 | /esbuild-openbsd-64/0.14.31: 179 | resolution: {integrity: sha512-NRAAPPca05H9j9Xab0kVXK0V6/pyZGGy8d2Y8KS0BMwWEydlD4KCJDmH8/7bWCKYLRGOOCE9/GPBJyPWHFW3sg==} 180 | engines: {node: '>=12'} 181 | cpu: [x64] 182 | os: [openbsd] 183 | requiresBuild: true 184 | dev: true 185 | optional: true 186 | 187 | /esbuild-sunos-64/0.14.31: 188 | resolution: {integrity: sha512-9uA+V8w9Eehu4ldb95lPWdgCMcMO5HH6pXmfkk5usn3JsSZxKdLKsXB4hYgP80wscZvVYXJl2G+KNxsUTfPhZw==} 189 | engines: {node: '>=12'} 190 | cpu: [x64] 191 | os: [sunos] 192 | requiresBuild: true 193 | dev: true 194 | optional: true 195 | 196 | /esbuild-windows-32/0.14.31: 197 | resolution: {integrity: sha512-VGdncQTqoxD9q3v/dk0Yugbmx2FzOkcs0OemBYc1X9KXOLQYH0uQbLJIckZdZOC3J+JKSExbYFrzYCOwWPuNyA==} 198 | engines: {node: '>=12'} 199 | cpu: [ia32] 200 | os: [win32] 201 | requiresBuild: true 202 | dev: true 203 | optional: true 204 | 205 | /esbuild-windows-64/0.14.31: 206 | resolution: {integrity: sha512-v/2ye5zBqpmCzi3bLCagStbNQlnOsY7WtMrD2Q0xZxeSIXONxji15KYtVee5o7nw4lXWbQSS1BL8G6BBMvtq4A==} 207 | engines: {node: '>=12'} 208 | cpu: [x64] 209 | os: [win32] 210 | requiresBuild: true 211 | dev: true 212 | optional: true 213 | 214 | /esbuild-windows-arm64/0.14.31: 215 | resolution: {integrity: sha512-RXeU42FJoG1sriNHg73h4S+5B7L/gw+8T7U9u8IWqSSEbY6fZvBh4uofugiU1szUDqqP00GHwZ09WgYe3lGZiw==} 216 | engines: {node: '>=12'} 217 | cpu: [arm64] 218 | os: [win32] 219 | requiresBuild: true 220 | dev: true 221 | optional: true 222 | 223 | /esbuild/0.14.31: 224 | resolution: {integrity: sha512-QA0fUM13+JZzcvg1bdrhi7wo8Lr5IRHA9ypNn2znqxGqb66dSK6pAh01TjyBOhzZGazPQJZ1K26VrCAQJ715qA==} 225 | engines: {node: '>=12'} 226 | hasBin: true 227 | requiresBuild: true 228 | optionalDependencies: 229 | esbuild-android-64: 0.14.31 230 | esbuild-android-arm64: 0.14.31 231 | esbuild-darwin-64: 0.14.31 232 | esbuild-darwin-arm64: 0.14.31 233 | esbuild-freebsd-64: 0.14.31 234 | esbuild-freebsd-arm64: 0.14.31 235 | esbuild-linux-32: 0.14.31 236 | esbuild-linux-64: 0.14.31 237 | esbuild-linux-arm: 0.14.31 238 | esbuild-linux-arm64: 0.14.31 239 | esbuild-linux-mips64le: 0.14.31 240 | esbuild-linux-ppc64le: 0.14.31 241 | esbuild-linux-riscv64: 0.14.31 242 | esbuild-linux-s390x: 0.14.31 243 | esbuild-netbsd-64: 0.14.31 244 | esbuild-openbsd-64: 0.14.31 245 | esbuild-sunos-64: 0.14.31 246 | esbuild-windows-32: 0.14.31 247 | esbuild-windows-64: 0.14.31 248 | esbuild-windows-arm64: 0.14.31 249 | dev: true 250 | 251 | /fsevents/2.3.2: 252 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} 253 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 254 | os: [darwin] 255 | requiresBuild: true 256 | dev: true 257 | optional: true 258 | 259 | /function-bind/1.1.1: 260 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} 261 | dev: true 262 | 263 | /has/1.0.3: 264 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} 265 | engines: {node: '>= 0.4.0'} 266 | dependencies: 267 | function-bind: 1.1.1 268 | dev: true 269 | 270 | /is-core-module/2.8.1: 271 | resolution: {integrity: sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==} 272 | dependencies: 273 | has: 1.0.3 274 | dev: true 275 | 276 | /nanoid/3.3.2: 277 | resolution: {integrity: sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==} 278 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 279 | hasBin: true 280 | dev: true 281 | 282 | /path-parse/1.0.7: 283 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} 284 | dev: true 285 | 286 | /picocolors/1.0.0: 287 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} 288 | dev: true 289 | 290 | /postcss/8.4.12: 291 | resolution: {integrity: sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==} 292 | engines: {node: ^10 || ^12 || >=14} 293 | dependencies: 294 | nanoid: 3.3.2 295 | picocolors: 1.0.0 296 | source-map-js: 1.0.2 297 | dev: true 298 | 299 | /resolve/1.22.0: 300 | resolution: {integrity: sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==} 301 | hasBin: true 302 | dependencies: 303 | is-core-module: 2.8.1 304 | path-parse: 1.0.7 305 | supports-preserve-symlinks-flag: 1.0.0 306 | dev: true 307 | 308 | /rollup/2.70.1: 309 | resolution: {integrity: sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==} 310 | engines: {node: '>=10.0.0'} 311 | hasBin: true 312 | optionalDependencies: 313 | fsevents: 2.3.2 314 | dev: true 315 | 316 | /source-map-js/1.0.2: 317 | resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} 318 | engines: {node: '>=0.10.0'} 319 | dev: true 320 | 321 | /supports-preserve-symlinks-flag/1.0.0: 322 | resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} 323 | engines: {node: '>= 0.4'} 324 | dev: true 325 | 326 | /typescript/4.6.3: 327 | resolution: {integrity: sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==} 328 | engines: {node: '>=4.2.0'} 329 | hasBin: true 330 | dev: false 331 | 332 | /vite/2.9.1: 333 | resolution: {integrity: sha512-vSlsSdOYGcYEJfkQ/NeLXgnRv5zZfpAsdztkIrs7AZHV8RCMZQkwjo4DS5BnrYTqoWqLoUe1Cah4aVO4oNNqCQ==} 334 | engines: {node: '>=12.2.0'} 335 | hasBin: true 336 | peerDependencies: 337 | less: '*' 338 | sass: '*' 339 | stylus: '*' 340 | peerDependenciesMeta: 341 | less: 342 | optional: true 343 | sass: 344 | optional: true 345 | stylus: 346 | optional: true 347 | dependencies: 348 | esbuild: 0.14.31 349 | postcss: 8.4.12 350 | resolve: 1.22.0 351 | rollup: 2.70.1 352 | optionalDependencies: 353 | fsevents: 2.3.2 354 | dev: true 355 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - packages/* 3 | --------------------------------------------------------------------------------