3

我正在尝试将 AtlasKit 与 Next.js 8 一起使用,但由于某种原因,SyntaxError: Unexpected token export尝试构建时出现错误。

我认为这是一个问题,@atlaskit/editor-core 没有为 ES6 正确预处理(通过 webpack 或 babel 等),但我不确定。有任何想法吗?

//Home.tsx
import * as React from 'react';
import * as classnames from 'classnames';
import * as css from './Home.css';
import { Editor } from '@atlaskit/editor-core';

export const Home: React.FunctionComponent = props => (
  <div className={classnames('test', css.home)}>
    <Editor />
  </div>
);

我创建了一个 repo 来复制这里的问题:https ://github.com/brandontle/nextjs-with-atlaskit

使用 AtlasKit Editor 的文件是 ~/src/components/Home.tsx。

4

0 回答 0