-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Chrome says Deprecated script, please remove #723
Comments
the 2 different script doesn't seems to work... any idea on how to fix this? |
It is not message by Chrome but Ionicons itself. |
|
Btw, in Vue projects Ionic should not include icons like this (from CDN) because icons are compiled in by webpack.
… 18. 2. 2020 v 8:14, Zachary Botterman ***@***.***>:
<script type="module" ***@***.***/dist/ionicons/ionicons.esm.js"></script> works just fine
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
also bumped into this in my nuxt project |
@carlflor the workaround i did to solve the problem was to npm install ionicons or react-icons from there on you can import any icons you want to use. |
i'm getting the same because the included file, for whatever reason, contains the following: (function(doc){
var scriptElm = doc.scripts[doc.scripts.length - 1];
var warn = ['[ionicons] Deprecated script, please remove: ' + scriptElm.outerHTML];
warn.push('To improve performance it is recommended to set the differential scripts in the head as follows:')
var parts = scriptElm.src.split('/');
parts.pop();
parts.push('ionicons');
var url = parts.join('/');
var scriptElm = doc.createElement('script');
scriptElm.setAttribute('type', 'module');
scriptElm.src = url + '/ionicons.esm.js';
warn.push(scriptElm.outerHTML);
scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
doc.head.appendChild(scriptElm);
scriptElm = doc.createElement('script');
scriptElm.setAttribute('nomodule', '');
scriptElm.src = url + '/ionicons.js';
warn.push(scriptElm.outerHTML);
scriptElm.setAttribute('data-stencil-namespace', 'ionicons');
doc.head.appendChild(scriptElm)
console.warn(warn.join('\n'));
})(document); which is perplexing given the instructions to simply paste i need to package ionicons with webpack and self-host everything and simply cannot find a way of having them work with the distributed code. i tried packaging |
Hi everyone, I have updated the Ionicons site to reflect the revised usage: https://ionic.io/ionicons/usage <script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script> |
This problem is caused by option 'Rocket Loader™' from Cloudflare. Switch off. |
Chrome gives
Please update usage doc to mention how to use ionicons without getting this warning. Thanks!
The text was updated successfully, but these errors were encountered: