Skip to content

Commit

Permalink
fix: Modify the babel config to convert typescript.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 1, 2021
1 parent e7492cf commit 984b49f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/tsbb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"@tsbb/babel-preset-tsbb": "1.13.0",
"@types/graceful-fs": "4.1.3",
"@types/node": "13.13.9",
"babel-plugin-transform-typescript-metadata": "0.3.1",
"babel-jest": "26.6.3",
"camelcase": "6.0.0",
"chalk": "4.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/tsbb/src/babel/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export default (filePath: string, options: ITransformOptions, targets: ITargets)
],
plugins: [
require.resolve('babel-plugin-add-module-exports'),
require.resolve('babel-plugin-transform-typescript-metadata'),
[require.resolve('@babel/plugin-proposal-decorators'), { legacy: true }],
[require.resolve('@babel/plugin-proposal-class-properties'), { loose: true }],
],
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tsbb/src/command/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const publicOptions: IYargsOptions = {
'source-maps': {
describe: 'Source Map options.',
type: 'string',
default: true,
default: 'inline',
choices: [true, 'inline', 'both', 'none'],
},
output: {
Expand Down

0 comments on commit 984b49f

Please sign in to comment.