From 58d9e5355b889829d438fa57f478c03336283461 Mon Sep 17 00:00:00 2001 From: Eddy Nguyen Date: Thu, 22 Aug 2024 01:31:19 +1000 Subject: [PATCH] Fix `build examples` CI step (#10113) * Revert swc plugin changes package.json that point to non-existent files * Convert vite config to mts to avoid errors --- .../tsconfig.node.json | 2 +- .../{vite.config.ts => vite.config.mts} | 0 packages/presets/swc-plugin/package.json | 28 +------------------ 3 files changed, 2 insertions(+), 28 deletions(-) rename examples/react/apollo-client-swc-plugin/{vite.config.ts => vite.config.mts} (100%) diff --git a/examples/react/apollo-client-swc-plugin/tsconfig.node.json b/examples/react/apollo-client-swc-plugin/tsconfig.node.json index 9d31e2aed93..046964021fc 100644 --- a/examples/react/apollo-client-swc-plugin/tsconfig.node.json +++ b/examples/react/apollo-client-swc-plugin/tsconfig.node.json @@ -5,5 +5,5 @@ "moduleResolution": "Node", "allowSyntheticDefaultImports": true }, - "include": ["vite.config.ts"] + "include": ["vite.config.mts"] } diff --git a/examples/react/apollo-client-swc-plugin/vite.config.ts b/examples/react/apollo-client-swc-plugin/vite.config.mts similarity index 100% rename from examples/react/apollo-client-swc-plugin/vite.config.ts rename to examples/react/apollo-client-swc-plugin/vite.config.mts diff --git a/packages/presets/swc-plugin/package.json b/packages/presets/swc-plugin/package.json index ce073918cb0..f357c4d05a6 100644 --- a/packages/presets/swc-plugin/package.json +++ b/packages/presets/swc-plugin/package.json @@ -9,7 +9,7 @@ "graphql-codegen", "preset-client" ], - "main": "dist/cjs/index.js", + "main": "swc_plugin.wasm", "scripts": { "build-wasm": "cargo build --target wasm32-wasi --release && cp target/wasm32-wasi/release/swc_plugin.wasm ./", "debug": "cargo build --target wasm32-wasi && cp target/wasm32-wasi/debug/swc_plugin.wasm ./" @@ -27,32 +27,6 @@ "swc_plugin.wasm" ], "type": "module", - "module": "dist/esm/index.js", - "typings": "dist/typings/index.d.ts", - "typescript": { - "definition": "dist/typings/index.d.ts" - }, - "exports": { - ".": { - "require": { - "types": "./dist/typings/index.d.cts", - "default": "./dist/cjs/index.js" - }, - "import": { - "types": "./dist/typings/index.d.ts", - "default": "./dist/esm/index.js" - }, - "default": { - "types": "./dist/typings/index.d.ts", - "default": "./dist/esm/index.js" - } - }, - "./package.json": "./package.json" - }, - "publishConfig": { - "directory": "dist", - "access": "public" - }, "engines": { "node": ">=16" }