template icon indicating copy to clipboard operation
template copied to clipboard

Importing a module throws "Uncaught ReferenceError: exports is not defined" in browser

Open akshat46 opened this issue 2 years ago • 0 comments

I am not sure if I am missing something obvious but I couldn't figure out how to fix this.

Reproducible

  • yarn add grid stack
  • added imports in App.svelte
  • yarn dev

Trying to import a node_module that uses exports throws exports not defined in browser console. I thought commonjs should be taking care of this but not sure. The same seems to work out of the box with svelte-webpack

akshat46 avatar Oct 24 '21 04:10 akshat46