fernet.js icon indicating copy to clipboard operation
fernet.js copied to clipboard

Browser-usable code?

Open josephernest opened this issue 6 years ago • 1 comments
trafficstars

Hello, I see that fernet.js (as well as fernetBrowser.js) contains require, etc. so this won't be accepted by the browsers if I just do

<script src="fernetBrowser.js"></script>

and copy the fernetBrowser.js file...

Could you just add a few lines in the README to explain how to "compile" / "transpile" / "pack" (?) the code (if needed?), and which tools are required for that.

Thank you in advance.

josephernest avatar Sep 30 '19 12:09 josephernest

You need to import browser version of package like this:

import fernet from 'fernet/fernetBrowser';

dikaso avatar Apr 10 '24 09:04 dikaso