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

Turn off quote stripping in HTML minify #12

Closed
motatoes opened this issue Sep 17, 2017 · 4 comments
Closed

Turn off quote stripping in HTML minify #12

motatoes opened this issue Sep 17, 2017 · 4 comments

Comments

@motatoes
Copy link

motatoes commented Sep 17, 2017

Related to this issue, I was having problems testing my app in the phonegap app, since it did not refresh automatically. The fix for me was to have the <script type="text/javascript" src="cordova.js"></script> as the last script in the document (it is strange).

As a fix for this I had to:

<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script type="text/javascript" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>
<% } %>
<script type="text/javascript" src="cordova.js"></script>

I can submit a PR with these changes if required :)

@motatoes motatoes changed the title Turn of quote stripping in HTML minify Turn off quote stripping in HTML minify Sep 17, 2017
@devgeeks
Copy link
Contributor

@motatoes
Copy link
Author

Hi @devgeeks

I can confirm that the following fixes the reload issue:

1- turning off removeAttributeQuotes as you stated and
2- Adding the MIME type to the cordova script tag in src/index.html:

<script type="text/javascript" src="cordova.js"></script>

@devgeeks
Copy link
Contributor

@motatoes OK. Thanks for working that out. I'll update all three templates with those fixes and publish to npm!

devgeeks added a commit that referenced this issue Nov 20, 2017
- removed `removeAttributeQuotes` minification
- changed `cordova.js` script tag to exactly match the one the dev app
  tries to replace
```
<script type="text/javascript" src="cordova.js"></script>
```

Fixes #12
@devgeeks
Copy link
Contributor

Published to NPM as well.

Thanks @motatoes

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

No branches or pull requests

2 participants