arco-design/arco-cli

windows环境无法运行 exports is not defined

azhengyongqin opened this issue · 2 comments

@MisterLuffy #38 (comment)

Windows环境下依然报错,麻烦解决windows下的环境
image

Originally posted by @azhengyongqin in #38 (comment)

这看起来是一个 Storybook 的配置问题,可以搜索一下 Storybook 的 Issue。刚才简单尝试了一下没有解决,如果解决了请在下边评论,我会去更新项目的默认配置。

我把.storybook/preview.js替换为以下内容,解决了exports is not defined的bug

import '@arco-design/web-vue/dist/arco.css';

module.exports = {
  parameters: {
    actions: { argTypesRegex: "^on[A-Z].*" },
    controls: {
      matchers: {
        color: /(background|color)$/i,
        date: /Date$/,
      },
    },
  },
};