|
1 | 1 | {
|
2 | 2 | "name": "vite",
|
3 | 3 | "version": "3.0.0-alpha.1",
|
| 4 | + "type": "module", |
4 | 5 | "license": "MIT",
|
5 | 6 | "author": "Evan You",
|
6 | 7 | "description": "Native-ESM powered web dev build tool",
|
7 | 8 | "bin": {
|
8 | 9 | "vite": "bin/vite.js"
|
9 | 10 | },
|
10 |
| - "main": "dist/node/index.js", |
11 |
| - "types": "dist/node/index.d.ts", |
| 11 | + "main": "./dist/node/index.js", |
| 12 | + "module": "./dist/node/index.js", |
| 13 | + "types": "./dist/node/index.d.ts", |
| 14 | + "exports": { |
| 15 | + ".": { |
| 16 | + "types": "./dist/node/index.d.ts", |
| 17 | + "import": "./dist/node/index.js", |
| 18 | + "require": "./index.cjs" |
| 19 | + }, |
| 20 | + "./client": { |
| 21 | + "types": "./client.d.ts" |
| 22 | + }, |
| 23 | + "./terser": { |
| 24 | + "require": "./dist/node-cjs/terser.cjs" |
| 25 | + } |
| 26 | + }, |
12 | 27 | "files": [
|
13 | 28 | "bin",
|
14 | 29 | "dist",
|
15 | 30 | "client.d.ts",
|
| 31 | + "index.cjs", |
16 | 32 | "src/client",
|
17 | 33 | "types"
|
18 | 34 | ],
|
|
29 | 45 | },
|
30 | 46 | "homepage": "https://github.com/vitejs/vite/tree/main/#readme",
|
31 | 47 | "scripts": {
|
32 |
| - "dev": "rimraf dist && rollup -c -w", |
| 48 | + "dev": "rimraf dist && pnpm run build-bundle -w", |
33 | 49 | "build": "rimraf dist && run-s build-bundle build-types",
|
34 |
| - "build-bundle": "rollup -c", |
| 50 | + "build-bundle": "rollup --config rollup.config.ts --configPlugin esbuild", |
35 | 51 | "build-types": "run-s build-temp-types patch-types roll-types",
|
36 | 52 | "build-temp-types": "tsc --emitDeclarationOnly --outDir temp/node -p src/node",
|
37 |
| - "patch-types": "ts-node scripts/patchTypes.ts", |
| 53 | + "patch-types": "esno scripts/patchTypes.ts", |
38 | 54 | "roll-types": "api-extractor run && rimraf temp",
|
39 | 55 | "lint": "eslint --ext .ts src/**",
|
40 | 56 | "format": "prettier --write --parser typescript \"src/**/*.ts\"",
|
|
75 | 91 | "dotenv": "^14.3.2",
|
76 | 92 | "dotenv-expand": "^5.1.0",
|
77 | 93 | "es-module-lexer": "^0.10.5",
|
| 94 | + "esno": "^0.16.3", |
78 | 95 | "estree-walker": "^2.0.2",
|
79 | 96 | "etag": "^1.8.1",
|
80 | 97 | "fast-glob": "^3.2.11",
|
|
0 commit comments