Skip to content

Commit

Permalink
feat(alita): support typescript namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ykforerlang committed Nov 6, 2019
1 parent 13ce9af commit d199d96
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/util/uast.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const babelTransformJSX = babel.createConfigItem(require("../misc/transformJSX")


const babelFlow = babel.createConfigItem(require("@babel/preset-flow"), {type: 'presets'})
const babelTSX = babel.createConfigItem([require("@babel/preset-typescript"), {isTSX: true, allExtensions: true}], {type: 'plugin'})
const babelTS = babel.createConfigItem([require("@babel/preset-typescript"), {isTSX: false, allExtensions: true}], {type: 'plugin'})
const babelTSX = babel.createConfigItem([require("@babel/preset-typescript"), {isTSX: true, allExtensions: true, allowNamespaces: true}], {type: 'plugin'})
const babelTS = babel.createConfigItem([require("@babel/preset-typescript"), {isTSX: false, allExtensions: true, allowNamespaces: true}], {type: 'plugin'})

const babelRestSpread = babel.createConfigItem([require("@babel/plugin-proposal-object-rest-spread"), { "loose": true, "useBuiltIns": true }])
const babelClassProperties = babel.createConfigItem([require("@babel/plugin-proposal-class-properties"), {"loose": true}])
Expand Down Expand Up @@ -93,8 +93,6 @@ export function geneReactCode(ast, extname) {
presets.push(babelFlow)
}

console.log('plugins:', plugins)

code = babel.transformSync(code, {
babelrc: false,
configFile: false,
Expand Down

0 comments on commit d199d96

Please sign in to comment.