favware / skip-dependency

Skip pesky NodeJS dependencies with ease
MIT License
20 stars 5 forks source link

ModuleNotFoundError: Module not found: Error: Default condition should be last one #20

Closed Semigradsky closed 2 years ago

Semigradsky commented 2 years ago

Hi! I tried to use this module to ignore airbnb-js-shims from storybook. It works with cjs, but doesn't work with esm, there is webpack error:

ERROR in ../../node_modules/@storybook/core-client/dist/esm/globals/polyfills.js 2:0-25
Module not found: Error: Default condition should be last one

manager (webpack 5.73.0) compiled with 1 error in 11652 ms

polyfills.js code:

import 'regenerator-runtime/runtime';
import 'airbnb-js-shims';
import 'core-js/features/symbol';

Maybe add default export to index file?