Skip to content

Commit

Permalink
resupport commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
geekact committed Dec 14, 2022
1 parent ebeeea9 commit ec659ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "vite-react",
"version": "2.0.0",
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json"
},
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export * from 'vite';
export * from './vite';
export { defineConfig } from './vite';
2 changes: 1 addition & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
splitting: true,
sourcemap: true,
clean: true,
format: ['esm'],
format: ['esm', 'cjs'],
platform: 'node',
tsconfig: './tsconfig.json',
target: 'node16',
Expand Down

0 comments on commit ec659ce

Please sign in to comment.