Skip to content

Fix Template files for main.js and router when not using a compiler #2828

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

Merged
merged 2 commits into from
Oct 28, 2018

Conversation

LinusBorg
Copy link
Member

Currently, both main.js and router.js templates contain arrow functions.

When a user chooses not to select babel or typescript during project creation, the generated code will fail in browsers that don't support arrow functions.

Since we aim to be compatible with IE 11 out of the box, I added conditionals to the templates for these files to use a normal function instead when neither babel nor typescript plugins are detected.

Don't use arrow function in main.js when not using babel nor typescript.
use normal function instead of arrow function
in router.js when neither babel nor typescript are used.
@Akryum Akryum merged commit 21256f5 into dev Oct 28, 2018
@Akryum Akryum deleted the fix-template-mainjs-es6 branch October 28, 2018 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants