小编Dat*_*aya的帖子

Jest中的动态导入产生:SyntaxError:意外的令牌导入

目前尚无法解决这些错误,Jest抱怨这样的动态导入:

const importModules = Promise.all([
      import('containers/HomePage/reducer'),
      import('containers/HomePage/sagas'),
      import('containers/HomePage'),
    ]);
Run Code Online (Sandbox Code Playgroud)

错误信息:

F:\react-boilerplate\app\store.js:49
      import('./reducers').then(function (reducerModule) {
      ^^^^^^
SyntaxError: Unexpected token import
Run Code Online (Sandbox Code Playgroud)

您可以在这里找到所有详细信息:https : //github.com/mxstbr/react-boilerplate/pull/1358

javascript reactjs jestjs babeljs

5
推荐指数
1
解决办法
1955
查看次数

标签 统计

babeljs ×1

javascript ×1

jestjs ×1

reactjs ×1