3

I'm having issues to load css files in storybok after upgrading the stencil core.

.strorybook.webpack.config.ts is the fellowing :

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;
};

the error is Error: ENOENT: no such file or directory, stat '/home/chaima/Desktop/io-components/vue-storybook/node_modules/@storybook/core/dist/public/components/components.esm.js'

doubleCH
  • 41
  • 3

0 Answers0