fix: Webpack out-of-box compatibility #67
|
for instance, this folder has all the builds and these have a callback. I will change the function name but I need to also make build folder but yet I'd like to understand what is Webpack doing. All files are built via |
|
Generally Webpack (and other build tool) users might pick the unminified source (build/document-register-element.max.js) to avoid any possible issues from double-minifying. They could tell the minifier not to minify this file, but that's not as nice as not having to worry about it and it's not something that they'd look for up front, I wouldn't think. From what I've seen, the general I'm not sure what Webpack does and it's unfortunate you'd have to do something like this to get around it, but maybe it's best to be defensive for tools doing funny things? |
|
if webpack imports my script on a global scope capable of overwriting AMD I will publish next package.json pointing at the max file but still ... I'd love to know what is Webpack doing |
|
Yeah not sure. FWIW, the minified file worked for me and doing this fixed it for the max file. I know at a higher level they test the name of the function being referenced in the AST, but probably not if it's already been defined in that scope. This may be file-able under Webpack's issue tracker for that matter, but I'm unsure as to how other tools would behave. |
|
I gonna quickly publish latest even if in not a perfect shape (still some desktop FF hiccups) but these issues should go. |
Renamed the local define() function to defineElement() so that Webpack (and possibly others) don't try and automatically shim AMD.
Fixes #66