Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mergeScripts true is safe?? Sorry, I do not think so. #80

Closed
lovetingyuan opened this issue Sep 2, 2019 · 2 comments
Closed

mergeScripts true is safe?? Sorry, I do not think so. #80

lovetingyuan opened this issue Sep 2, 2019 · 2 comments

Comments

@lovetingyuan
Copy link

As everyone knows, the order of scripts is important, so I do not think setting mergeScripts true is "safe".
eg:

<html>
<head>
<script>window.foo = 'foo'</script>
</head>
<body></body>
<script src="./script-need-foo-variable.js"></script>
<script>window.bar = 'bar'</script>
</html>

after minify, script-need-foo-variable.js will be broken.
see

mergeScripts: true,

maltsev added a commit that referenced this issue Sep 2, 2019
@maltsev
Copy link
Member

maltsev commented Sep 2, 2019

Thanks! I fixed it.

@maltsev maltsev closed this as completed Sep 2, 2019
maltsev added a commit that referenced this issue Sep 2, 2019
@maltsev
Copy link
Member

maltsev commented Nov 9, 2019

I released this fix in the new version 0.2.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants