Skip to content

Commit

Permalink
chore: drop CJS build (#151)
Browse files Browse the repository at this point in the history
Co-authored-by: Alec Larson <1925840+aleclarson@users.noreply.github.com>

BREAKING CHANGE
  • Loading branch information
benmccann committed Aug 7, 2024
1 parent 03ffe4a commit 5ff0d6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ Give [`vite`] the ability to resolve imports using TypeScript's path mapping.

1. Install as dev dependency

2. Inject `vite-tsconfig-paths` using the `vite.config.ts` module
2. Ensure the project either has `"type": "module"` set or that the Vite config is renamed to `vite.config.mjs` / `vite.config.mts` depending on whether TypeScript is used

3. Inject `vite-tsconfig-paths` in the Vite config

```ts
import { defineConfig } from 'vite'
Expand Down
12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,10 @@
"name": "vite-tsconfig-paths",
"version": "4.3.2",
"description": "Vite resolver for TypeScript compilerOptions.paths",
"main": "dist/index.js",
"module": "dist/index.mjs",
"type": "module",
"exports": {
"import": "./dist/index.mjs",
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"author": "aleclarson",
"repository": "aleclarson/vite-tsconfig-paths",
Expand All @@ -18,7 +14,7 @@
"clean": "rimraf dist && git checkout HEAD dist",
"dev": "yarn bundle --watch",
"build": "yarn clean && yarn bundle",
"bundle": "tsup-node src/index.ts --sourcemap --dts --format cjs,esm",
"bundle": "tsup-node src/index.ts --sourcemap --dts --format esm",
"prepare": "yarn build",
"test": "jest"
},
Expand Down

0 comments on commit 5ff0d6a

Please sign in to comment.