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

IE11 - Component does not load when class attribute is used in JSX template #1757

Closed
nmina opened this issue Jul 23, 2019 · 3 comments · Fixed by #1760 or #1762
Closed

IE11 - Component does not load when class attribute is used in JSX template #1757

nmina opened this issue Jul 23, 2019 · 3 comments · Fixed by #1760 or #1762
Labels

Comments

@nmina
Copy link

nmina commented Jul 23, 2019

Stencil version:

 @stencil/core@1.1.8

I'm submitting a:
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
Web Component does not load in IE11 with @stencil/core versions 1.1.8 and above when class attribute is used in JSX template.

Expected behavior:
Component should load in IE11.

Steps to reproduce:
Create a Stencil starter project using the CLI.

npm init stencil
Pick a starter > component
Project name > any-name

in my-component.tsx, add class attribute in the div tag:

import {Component, Prop, h, Element} from '@stencil/core';
import {format} from '../../utils/utils';

@Component({
  tag: 'my-component',
  styleUrl: 'my-component.css',
  shadow: false
})
export class MyComponent {
  /**
   * The first name
   */
  @Prop() first: string;
  
  /**
   * The middle name
   */
  @Prop() middle: string;
  
  /**
   * The last name
   */
  @Prop() last: string;
  
  @Element() el: HTMLElement;
  
  private getText(): string {
    return format(this.first, this.middle, this.last);
  }
  
  render() {
    return <div class="message">Hello, World! I'm {this.getText()}</div>;
  }
}

Add --es5 in package.json's start script:

"start": "stencil build --dev --watch --serve --es5"

then run the app in IE11.

Console shows the following error:
image
Related code:

@ionitron-bot ionitron-bot bot added the triage label Jul 23, 2019
@arielsalminen
Copy link
Contributor

arielsalminen commented Jul 24, 2019

If it helps, this regression was introduced in "@stencil/core": "1.1.8" and downgrading to "@stencil/core": "1.1.7" fixes the issue.

@nmina
Copy link
Author

nmina commented Jul 24, 2019

Thanks @viljamis. Yes I have my application version set to 1.1.7 until this is fixed. I guess unless they decided to move forward and leave IE11 behind. lol

@cary-smith
Copy link
Contributor

We are also stuck on 1.1.7 after finally getting off of 0.15.2. Woohoo! This is the only roadblock and I have submitted a pull.

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