Skip to content

Commit

Permalink
feat: expose ESM build with debug (#1585)
Browse files Browse the repository at this point in the history
So that debug logs can be printed with vite:

```js
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
  plugins: [react()],
  server: {
    port: 4000
  },
  resolve: {
    conditions: ["development"]
  }
})
```

Reference: https://v2.vitejs.dev/config/#resolve-conditions

Related:

- socketio/socket.io#4731
- socketio/socket.io#4635
- https://github.com/socketio/socket.io-client/issues/1516
  • Loading branch information
FossPrime authored Jun 20, 2023
1 parent 8f14b98 commit 781d753
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"types": "./build/esm/index.d.ts",
"import": {
"node": "./build/esm-debug/index.js",
"development": "./build/esm-debug/index.js",
"default": "./build/esm/index.js"
},
"require": "./build/cjs/index.js"
Expand Down

0 comments on commit 781d753

Please sign in to comment.