egg-js 如何加载es6的improt/export

Created on 11 May 2019  ·  3Comments  ·  Source: eggjs/egg

我在编写egg项目的时候,由于之前koa2的项目都是采用babel来兼容es6的import/export的特性 在egg里面使用 require很不适应 但是布置到在哪里处理这个问题

Most helpful comment

  1. 不要用这种非标准的特性,没啥收益
  2. 可以考虑用 TS
  3. 试试 egg-bin dev --require=bable/register

All 3 comments

  1. 不要用这种非标准的特性,没啥收益
  2. 可以考虑用 TS
  3. 试试 egg-bin dev --require=bable/register

谢谢 我试试 只要是TS还没来得及学习

  1. 不要用这种非标准的特性,没啥收益
  2. 可以考虑用 TS
  3. 试试 egg-bin dev --require=bable/register

import/export 不是标准特性?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lvgg3271 picture lvgg3271  ·  3Comments

Ailein picture Ailein  ·  3Comments

weijiatan456 picture weijiatan456  ·  3Comments

zhaofinger picture zhaofinger  ·  3Comments

whlsxl picture whlsxl  ·  3Comments