Skip to content

Commit

Permalink
fix: upgrade dependencies and tooling
Browse files Browse the repository at this point in the history
also upgrade internally to
- type: module
- vitest instead of jest
- build with esbuild for cjs and mjs
  • Loading branch information
Xiphe committed Aug 2, 2023
1 parent c59947d commit efcf946
Show file tree
Hide file tree
Showing 10 changed files with 2,306 additions and 3,916 deletions.
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"trailingComma": "all",
"jsxBracketSameLine": false,
"singleQuote": true
}
27 changes: 27 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { build } from 'esbuild';
import { nodeExternalsPlugin } from 'esbuild-node-externals';

build({
entryPoints: ['src/index.ts'],
bundle: true,
platform: 'node',
outfile: 'dist/index.mjs',
format: 'esm',
target: 'es2020',
sourcemap: true,
plugins: [nodeExternalsPlugin()],
});

build({
entryPoints: ['src/index.ts'],
bundle: true,
platform: 'node',
outfile: 'dist/index.cjs',
format: 'cjs',
target: 'es2016',
sourcemap: true,
plugins: [nodeExternalsPlugin()],
});

// esbuild src/index.ts --outfile=dist/index.mjs --format=esm --bundle --target=es2020 --external:node_modules/* --platform=node --sourcemap",
// "build:cjs": "esbuild src/index.ts --outfile=dist/index.cjs --format=cjs --bundle --target=es2016 --external:node_modules/* --platform=node --sourcemap",
Loading

0 comments on commit efcf946

Please sign in to comment.