Webpack required to build usable bacbone.localstorage.js file in browser?
chill117 opened this issue · 4 comments
chill117 commented
I am trying to use Backbone.localStorage in the browser, but I cannot simply include the current build/backbone.localStorage.js
build file like this:
<script src="path/to/deps/backbone.localStorage.js"></script>
Because I get this error:
Uncaught ReferenceError: module is not defined
I am now attempting to use webpack to create a build file that I can use, but I would really like to avoid adding webpack as a dependency to my project.
Thanks!
scott-w commented
Hi @chill117, thanks for reporting this. I've marked this as a bug to be resolved before v2.0 can go out.
It seems Webpack is building an output file that assumes the module
global exists, which isn't the case in a browser environment.