Skip to content

Commit

Permalink
feat([publish]): add typeScript option
Browse files Browse the repository at this point in the history
  • Loading branch information
Hypnosphi committed Aug 2, 2021
1 parent dd59e17 commit 7c35a02
Show file tree
Hide file tree
Showing 3 changed files with 1,618 additions and 1,406 deletions.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = function preset(api, opts) {
const transformRuntime = opts.transformRuntime || false;
const useBuiltIns = opts.useBuiltIns || false;
const angularSupport = opts.angular || false;
const typeScript = opts.typeScript || false;
const corejs = opts.corejs || '2';

const envConfig = {
Expand All @@ -25,7 +26,8 @@ module.exports = function preset(api, opts) {
return {
presets: [
require('@babel/preset-react'),
[require('@babel/preset-env'), envConfig]
[require('@babel/preset-env'), envConfig],
typeScript ? require('@babel/preset-typescript') : null
],
plugins: [
require('@babel/plugin-transform-strict-mode'),
Expand Down
Loading

0 comments on commit 7c35a02

Please sign in to comment.