Skip to content

Commit

Permalink
Fix: Use CJS for node entrypoint (#152)
Browse files Browse the repository at this point in the history
* use CJS for node entrypoint

* upgrade vitest deps
  • Loading branch information
yannbf committed May 3, 2024
1 parent 6ec7c44 commit 104e651
Show file tree
Hide file tree
Showing 4 changed files with 596 additions and 489 deletions.
6 changes: 3 additions & 3 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@types/react-router-dom": "^5.3.3",
"@vitejs/plugin-react": "^3.1.0",
"@vitejs/plugin-react": "^4.2.1",
"chromatic": "^11.0.3",
"jsdom": "^23.0.0",
"msw": "^2.0.9",
"storybook": "^8.0.0",
"typescript": "^5.3.2",
"vite": "^4.1.0",
"vitest": "^0.29.2"
"vite": "^5.2.11",
"vitest": "^1.6.0"
},
"msw": {
"workerDirectory": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/msw-addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"types": "./dist/index.browser.d.ts",
"browser": "./dist/index.browser.js",
"react-native": "./dist/index.react-native.js",
"node": "./dist/index.node.js",
"node": "./dist/index.node.cjs",
"default": "./dist/index.browser.js"
},
"./package.json": "./package.json"
Expand Down
1 change: 1 addition & 0 deletions packages/msw-addon/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const node = defineConfig({
'index.node': './src/index.ts',
},
target: 'node18',
format: 'cjs',
esbuildOptions(options) {
options.alias = {
...(options.alias || {}),
Expand Down

0 comments on commit 104e651

Please sign in to comment.