-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 chore: Fix package.json exports (#592)
## Description Fix exports field in package.json ## Testing Explain the quality checks that have been done on the code changes ## Additional Information - [ ] I read the [contributing docs](../docs/contributing.md) (if this is your first contribution) Your ENS/address: --------- Co-authored-by: Will Cory <[email protected]>
- Loading branch information
1 parent
32c7f25
commit eb3f734
Showing
27 changed files
with
153 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { file } from 'bun' | ||
export const file = require('bun').file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,15 @@ | |
"Will Cory <[email protected]>" | ||
], | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"import": "./src/index.js", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.cjs", | ||
"types": "./types/src/index.d.ts" | ||
} | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "src/index.js", | ||
"types": "types/src/index.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,15 @@ | |
"Will Cory <[email protected]>" | ||
], | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.cjs", | ||
"types": "./types/index.d.ts" | ||
} | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "types/index.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,15 @@ | |
"Will Cory <[email protected]>" | ||
], | ||
"type": "module", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"import": "./src/index.js", | ||
"require": "./dist/index.cjs", | ||
"default": "./dist/index.cjs", | ||
"types": "./types/index.d.ts" | ||
} | ||
}, | ||
"main": "dist/index.cjs", | ||
"module": "src/index.js", | ||
"types": "types/index.d.ts", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,21 @@ | ||
import { esbuildPluginEvmts } from '@evmts/esbuild-plugin' | ||
import { build, context } from 'esbuild' | ||
import { start as startLiveServer } from 'live-server' | ||
import { build } from 'esbuild' | ||
|
||
const isDev = process.env.NODE_ENV === '"development"' | ||
build({ | ||
entryPoints: ['src/index.js'], | ||
outdir: 'dist', | ||
minify: true, | ||
sourcemap: false, | ||
bundle: true, | ||
define: { | ||
'process.env.NODE_ENV': JSON.stringify( | ||
process.env.NODE_ENV ?? 'production', | ||
), | ||
}, | ||
plugins: [esbuildPluginEvmts()], | ||
// logLevel: "silent", | ||
}).catch((e) => { | ||
console.error(e) | ||
process.exit(1) | ||
}) | ||
|
||
if (isDev) { | ||
context({ | ||
entryPoints: ['src/index.js'], | ||
outdir: 'dist', | ||
minify: false, | ||
sourcemap: true, | ||
bundle: true, | ||
define: { | ||
'process.env.NODE_ENV': JSON.stringify( | ||
process.env.NODE_ENV ?? 'production', | ||
), | ||
}, | ||
plugins: [esbuildPluginEvmts()], | ||
// logLevel: "silent", | ||
}) | ||
.then((ctx) => { | ||
return ctx.watch() | ||
}) | ||
.catch((e) => { | ||
console.error(e) | ||
process.exit(1) | ||
}) | ||
|
||
startLiveServer({ | ||
root: 'build', | ||
open: false, | ||
host: 'localhost', | ||
port: 3000, | ||
// logLevel: 0, | ||
}) | ||
} else { | ||
build({ | ||
entryPoints: ['src/index.js'], | ||
outdir: 'dist', | ||
minify: true, | ||
sourcemap: false, | ||
bundle: true, | ||
define: { | ||
'process.env.NODE_ENV': JSON.stringify( | ||
process.env.NODE_ENV ?? 'production', | ||
), | ||
}, | ||
plugins: [esbuildPluginEvmts()], | ||
// logLevel: "silent", | ||
}).catch((e) => { | ||
console.error(e) | ||
process.exit(1) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
"contributors": [ | ||
"Will Cory <[email protected]>" | ||
], | ||
"type": "module", | ||
"scripts": { | ||
"build": "bun run build:dist", | ||
"build:dist": "NODE_ENV=production bun ./build.js", | ||
|
Oops, something went wrong.
eb3f734
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
evmts-docs – ./
evmts-docs-git-main-evmts.vercel.app
evmts-docs-evmts.vercel.app
evmts.dev