runisland / meteor-ionic4

Meteor Atmosphere package that automatically imports Ionic4 Web Components into your Client templates
MIT License
14 stars 6 forks source link

Deprecated script warning #8

Closed wreiske closed 3 years ago

wreiske commented 5 years ago

This morning after doing a meteor update I started seeing this in the console.

runisland_ionic4.js?hash=f8afd8e06121152784a9c5ea58f263b89f3aa978:83 [ionic] Deprecated script, please remove: <script type="text/javascript" src="/packages/runisland_ionic4.js?hash=f8afd8e06121152784a9c5ea58f263b89f3aa978" data-resources-url="https://testsystem/packages/runisland_ionic4/dist/ionic/"></script>
To improve performance it is recommended to set the differential scripts in the head as follows:
<script type="module" src="https://testsystem/packages/ionic/ionic.esm.js"></script>
<script nomodule="" src="https://testsystem/packages/ionic/ionic.js"></script>

EDIT: Using 4.4.2 seems to work for now, but the latest version shows the error above.

ghybs commented 5 years ago

Hi,

Thank you for your message.

Unfortunately I am no longer actively using Meteor or Ionic, so I will not be able to sort out the reason for this message and a solution.

Please feel free to send a PR nevertheless, I will do my best to review it!

ghybs commented 3 years ago

This deprecation notice seems to have been introduced in @ionic/core version 4.6.0 (see e.g. https://unpkg.com/browse/@ionic/core@4.6.0/dist/ionic.js)

If I understand correctly, Ionic now ships 2 versions, 1 for esm (module type) and 1 as before, but in the "dist/ionic" subfolder, whereas we still try to load it from "dist" folder directly.

This backward compatibility file seems to have been last shipped in version 5.4.1 (see e.g. https://unpkg.com/browse/@ionic/core@5.4.1/dist/ionic.js).

The "easy" solution seems to be simply to use the new "dist/ionic/ionic.js" file instead... except that it looks to be missing in version 5.4.2 and 5.4.3! (see https://unpkg.com/browse/@ionic/core@5.4.2/dist/ionic/ionic.js and https://unpkg.com/browse/@ionic/core@5.4.3/dist/ionic/ionic.js) It is back since version 5.4.4 (https://unpkg.com/browse/@ionic/core@5.4.4/dist/ionic/ionic.js) (would be interesting to find the reason for this missing file => see https://github.com/ionic-team/ionic-framework/issues/22483).

We could therefore simply update the build script to reference the new file, but we would probably have to skip version 5.4.2 and 5.4.3, unless we find some time to find a workaround just for these 2 versions...