【问题标题】:exports.__esModule = true; shows as an error in angular 1.6 transpiled code出口.__esModule = true;在 Angular 1.6 转译代码中显示为错误
【发布时间】:2017-08-23 10:31:27
【问题描述】:

我不知道 babel 有什么变化,但我试图从过去 2 天解决:(

问题是:

Uncaught ReferenceError: exports is not defined at app.js:2

我在 chrome 控制台中有 102 个问题,因为我的转译代码中有一行,即

exports.__esModule = true;

我的项目中使用了以下内容:

Angular 1.6
Typescript
Babel@6

任何帮助将不胜感激。谢谢:)

【问题讨论】:

    标签: angularjs typescript babeljs typescript-typings


    【解决方案1】:

    npm install @types/node

    https://www.npmjs.com/package/@types/node

    .d.ts 文件将定义全局导出

    【讨论】:

      猜你喜欢
      • 2017-08-07
      • 1970-01-01
      • 2013-07-16
      • 2021-03-20
      • 1970-01-01
      • 1970-01-01
      • 2017-08-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多