Skip to content

Commit

Permalink
feat: add @babel/plugin-syntax-decorators and @babel/preset-typescrip…
Browse files Browse the repository at this point in the history
…t presets
  • Loading branch information
bcoe authored Dec 27, 2024
2 parents b927b65 + 07d31f9 commit 4c18cf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export async function load(url, context, nextLoad) {

/* Can/should this handle inputSourceMap? */
const {code} = await babel.transformAsync(source, {
presets: ['@babel/preset-typescript'],
babelrc: false,
configFile: false,
filename,
Expand All @@ -67,7 +68,8 @@ export async function load(url, context, nextLoad) {
plugins: babelConfig.parserPlugins
},
plugins: [
['babel-plugin-istanbul', babelConfig]
['babel-plugin-istanbul', babelConfig],
['@babel/plugin-syntax-decorators', {decoratorsBeforeExport: true}]
]
});

Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
},
"homepage": "https://github.com/istanbuljs/esm-loader-hook#readme",
"dependencies": {
"@babel/plugin-syntax-decorators": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@babel/core": "^7.8.7",
"@istanbuljs/load-nyc-config": "^1.1.0",
"@istanbuljs/schema": "^0.1.3",
Expand Down

0 comments on commit 4c18cf8

Please sign in to comment.