升级模具核心后,故事书未加载模具Web组件CSS文件

时间:2019-09-17 14:45:38

标签: storybook stenciljs

在升级模具核心后,我无法在Storybok中加载CSS文件。

.strorybook.webpack.config.ts是伙伴:

const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');

module.exports = (baseConfig, env, defaultConfig) => {
  // We extend the default config by
  const copyWebpackPlugin = new CopyWebpackPlugin([
    {
      from: path.resolve(__dirname, '../node_modules/io-components/components'),
      to: path.posix.join('static', 'components'),
      ignore: ['.*']
    },
    {
      from: path.resolve(__dirname, '../src/assets'),
      to: path.posix.join('static', 'assets'),
      ignore: ['.*']
    },
    {
      from: path.resolve(__dirname, '../static/assets/'),
      to: path.posix.join('./','assets'),
      ignore: ['.*']
    },


  ]



  );

  if (defaultConfig.plugins) {
    defaultConfig.plugins.push(copyWebpackPlugin);
  } else {
    defaultConfig.plugins = [
      copyWebpackPlugin
    ];
  }

  return defaultConfig;
};

错误是 错误:ENOENT:没有这样的文件或目录,状态为'/home/chaima/Desktop/io-components/vue-storybook/node_modules/@storybook/core/dist/public/components/components.esm.js'< / strong>

0 个答案:

没有答案