-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix custom build with zwave-js (#3354)
- Loading branch information
1 parent
aeedd90
commit 97c89a6
Showing
3 changed files
with
23 additions
and
3 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,19 @@ | ||
'use strict' | ||
|
||
const { register } = require('esbuild-register/dist/node') | ||
|
||
register({ | ||
hookMatcher(f) { | ||
return f.endsWith('.ts') | ||
}, | ||
// Prevent esbuild from adding a "2" to the names of CC classes for some reason. | ||
keepNames: true, | ||
// Target the correct node version in transpilation | ||
target: `node${process.versions.node}`, | ||
// Stick to legacy decorators for now | ||
tsconfigRaw: { | ||
compilerOptions: { | ||
experimentalDecorators: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"watch": ["**/*.ts", "package.json", "tsconfig.json"], | ||
"ext": "ts,json", | ||
"watch": ["**/*.ts", "package.json", "tsconfig.json", "../node-zwave-js/packages/*/build/**/*.js"], | ||
"ext": "ts,json,js", | ||
"ignore": ["pkg", "store", "node_modules", "src", "dist", "server"], | ||
"exec": "node --inspect=7004 --trace-warnings -r esbuild-register bin/www.ts" | ||
"exec": "node --inspect=7004 --trace-warnings -r ./esbuild-register bin/www.ts" | ||
} |
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