squel.select().from is undefined after minimizing
jonathanpipe opened this issue · 6 comments
Only after minimizing, when I try to do squel.select().from(...) I get an error that squel.select().from is undefined. When not minimized, the code works fine. Has anyone successfully minimized the code using webpack 4?
I'm seeing the same issue. Has anyone been able to find a way around it? It looks like the squel.select()
doesn't return the squel
object after it's been minified, so it can't be chained.
I added squel
to the global variables in my build and stopped importing it throughout the app. Unfortunate, but now it works.
My use case is with an angular-cli build (which is using webpack 4) but there is a scripts property in the build that allows you to globally load the script (same as adding the script tag to index.html)
I ended up excluding it from webpack build and added it as an external:
In webpack config
config.externals = {
squel: 'squel'
};
In html
<script type="text/javascript" src="/assets/externals/squel.min.js"></script>
Confirmed, same problem here. @hiddentao can you please have a look at this?
@RickyRoller thanks a lot for the tip, I'm also using Angular and solved this way: azerothcore/Keira3@98f191e
However, it's really a pity to have such a bug :(
has any one found a solution for React JS?