Skip to content

Safari Mac & iOS - ionic/core (npm module) - ionic scripts load issue - 'TypeError: 'text/html' is not a valid JavaScript MIME type' #17301

@PrasannaaSanthanam

Description

@PrasannaaSanthanam

Hi All,
I am using just the ionic/core package in my angular app (v1.5.x) using the npm module. (https://www.npmjs.com/package/@ionic/core)

I use webPack to copy the ionic and the related directories from node modules to required destination (libs/ionic) and load just the ionic.js from my libs/ionic in my app's index.html, this internally loads the the dependent ionic scripts from the same libs/ionic dir.

The above works fine on chrome(v 71.x) & FF (v64.x), but fails on Safari (11.x, on both Mac & iOS).

On Safari, once the ionic.js gets loaded, it tries to load the additional files but fails with the below error
TypeError: 'text/html' is not a valid JavaScript MIME type, because of which ionic components fails to render.

Note: This issue does NOT happen when I use the CDN version of ionic js like below.
<script src="https://unpkg.com/@ionic/core@4.0.0/dist/ionic.js"></script>

thanks
Prasannaa

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: replythe issue needs a response from the userpackage: core@ionic/core package

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions