Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

squel.select().from is undefined after minimizing #372

Open
jonathanpipe opened this issue Dec 4, 2018 · 6 comments
Open

squel.select().from is undefined after minimizing #372

jonathanpipe opened this issue Dec 4, 2018 · 6 comments
Milestone

Comments

@jonathanpipe
Copy link

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?

@RickyRoller
Copy link

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.

@RickyRoller
Copy link

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)

@jonathanpipe
Copy link
Author

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>

@FrancescoBorzi
Copy link

Confirmed, same problem here. @hiddentao can you please have a look at this?

FrancescoBorzi added a commit to azerothcore/Keira3 that referenced this issue Jun 16, 2019
@FrancescoBorzi
Copy link

@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 :(

@hiddentao hiddentao added this to the 5.10.0 milestone Jun 18, 2019
@taibui-rogue
Copy link

taibui-rogue commented Aug 9, 2019

has any one found a solution for React JS?

FrancescoBorzi added a commit to azerothcore/Keira3 that referenced this issue Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants