-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
52 additions
and
8 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
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,23 @@ | ||
import esbuild from 'esbuild'; | ||
import { createProxyServer } from '../../esbuild.proxy.mjs'; | ||
|
||
const plugins = []; | ||
|
||
const options = { | ||
entryPoints: ['src/index.ts'], | ||
bundle: true, | ||
format: 'esm', | ||
platform: 'browser', | ||
target: 'esnext', | ||
preserveSymlinks: true, | ||
treeShaking: true, | ||
sourcemap: true, | ||
outdir: 'out/', | ||
logLevel: 'info', | ||
}; | ||
|
||
const ctx = await esbuild.context({ ...options, plugins }); | ||
await ctx.rebuild(); | ||
await ctx.watch(); | ||
const localServer = await ctx.serve({ servedir: './', host: '127.0.0.1' }); | ||
createProxyServer(localServer); |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import esbuild from 'esbuild'; | ||
|
||
import { esmConfig, getPackageJson } from '../../esbuild.config.mjs'; | ||
|
||
const packageJson = getPackageJson(import.meta.url); | ||
const peerDependencies = packageJson.peerDependencies || {}; | ||
|
||
const plugins = []; | ||
|
||
const options = { | ||
...esmConfig, | ||
bundle: true, | ||
sourcemap: true, | ||
external: Object.keys(peerDependencies), | ||
}; | ||
|
||
const ctx = await esbuild.context({ ...options, plugins }); | ||
await ctx.rebuild(); | ||
await ctx.watch(); |
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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