-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build!: switch from rollup to esbuild to build
BREAKING CHANGE: UMD is no longer exported. In order to reduce complexity and simplify the build process, we have switched from rollup to esbuild and only export CJS and ESM versions. This means that the UMD build is no longer exported.
- Loading branch information
Showing
10 changed files
with
507 additions
and
257 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as esbuild from 'esbuild'; | ||
import { glob } from 'glob'; | ||
|
||
const files = glob.sync('src/**/*.{ts,tsx}', { | ||
ignore: ['src/examples/**', 'src/**/__tests__/**', 'src/**/*.spec.{ts,tsx}'], | ||
}); | ||
|
||
// Exports ESM | ||
esbuild.build({ | ||
entryPoints: files, | ||
outdir: 'dist/esm', | ||
bundle: false, | ||
sourcemap: true, | ||
splitting: true, | ||
platform: 'browser', | ||
format: 'esm', | ||
target: ['esnext'], | ||
minify: true, | ||
}); | ||
|
||
// Exports CJS | ||
esbuild.build({ | ||
entryPoints: files, | ||
outdir: 'dist/cjs', | ||
bundle: false, | ||
sourcemap: true, | ||
platform: 'browser', | ||
format: 'cjs', | ||
target: ['esnext'], | ||
minify: true, | ||
}); |
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
Oops, something went wrong.