Skip to content

Commit

Permalink
feat: use esbuild instead of webpack AnWeber/vscode-httpyac#62
Browse files Browse the repository at this point in the history
  • Loading branch information
AnWeber committed Sep 24, 2021
1 parent 3e3c813 commit 3599358
Show file tree
Hide file tree
Showing 11 changed files with 809 additions and 2,401 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ extends:
- plugin:node/recommended
- plugin:@typescript-eslint/recommended
ignorePatterns:
- "**/examples/**/*.js"
- webpack.config.js
- '**/buildSrc/**'
rules:
array-bracket-spacing: "error"
array-callback-return: "error"
Expand Down
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.vscode
src
webpack.config.js
.eslintrc.json
dev.env
assets
Expand Down
12 changes: 0 additions & 12 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
"reveal": "never"
},
"group": "build"
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": "build",
"problemMatcher": [],
"label": "npm: watch",
"detail": "webpack --watch --config ./webpack.config.js"
}
]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 4.0.4 (2021-09-23)

#### Fix
* use esbuild instead of webpack. Fixes require error in @grpc/proto-loader
* stack overflow with multiple use of the same ref statement

## 4.0.3 (2021-09-22)

#### Fix
Expand Down
22 changes: 22 additions & 0 deletions buildSrc/esbuild.js
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))
Loading

0 comments on commit 3599358

Please sign in to comment.