Useful or not, from you.
svelte unclear / difficult to import uuidv4
  1. install normal svelte template
  2. npm install uuid --save
  3. import uuidv4 from "uuid/v4"
  4. make a function which invokes uuidv4()
  5. chrome localhost:5000
  6. uuidv4 does not work

(!) Unresolved dependencies crypto (imported by node_modules/uuid/lib/rng.js, commonjs-external-crypto) (!) Missing global variable name Use output.globals to specify browser global variable names corresponding to external modules crypto (guessing 'crypto')

How can we clarify how to make svelte handle this dependency?

No luck with results on google. Potential opportunity: improve docs re: dependencies

That's a useful answer
Without any help

Hi @bionicles!

uuid/v4 uses a Node build by default that doesn't work in the browser. You can set the browser option of the rollup-plugin-node-resolve plugin to true in order for Rollup to look for the browser field in dependencies' package.json instead and use that build if it exists.

  browser: true