marcuswestin / store.js

Cross-browser storage for all use cases, used across the web.
MIT License
14.01k stars 1.33k forks source link

Unable to use with Angular 4 "require is not definied" #268

Open prakashraman opened 6 years ago

prakashraman commented 6 years ago

Hi

I installed the package using

npm install store

And have include the following in my .angular-cli.json

"scripts": [
        "../node_modules/store/dist/store.legacy.js"
      ],

I get the follow error when the browser loads up

scripts.bundle.js:1883 Uncaught ReferenceError: require is not defined
at scripts.bundle.js:1883

I don't think this is an issue with store.js. Although what needs to be done to get it to work?

Thanks!