-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use esbuild instead of webpack AnWeber/vscode-httpyac#62
- Loading branch information
Showing
11 changed files
with
809 additions
and
2,401 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.vscode | ||
src | ||
webpack.config.js | ||
.eslintrc.json | ||
dev.env | ||
assets | ||
|
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,22 @@ | ||
const esbuild = require('esbuild') | ||
|
||
const makeAllPackagesExternalPlugin = { | ||
name: 'make-all-packages-external', | ||
setup(build) { | ||
let filter = /^[^.\/]|^\.[^.\/]|^\.\.[^\/]/ // Must not start with "/" or "./" or "../" | ||
build.onResolve({ filter }, args => ({ path: args.path, external: true })) | ||
}, | ||
} | ||
|
||
esbuild.build({ | ||
logLevel: "info", | ||
entryPoints: ['./src/index.ts'], | ||
outfile: 'dist/index.js', | ||
bundle: true, | ||
minify: true, | ||
platform: 'node', | ||
sourcemap: true, | ||
target: 'node14', | ||
watch: process.argv.indexOf('--watch') >= 0, | ||
plugins: [makeAllPackagesExternalPlugin] | ||
}).catch(() => process.exit(1)) |
Oops, something went wrong.