Closed dmongrel closed 6 years ago
@dmongrel Can you update the CLI to beta.4. We just pushed a fix yesterday that I think is related to this. Let me know!
@EisenbergEffect Yes it seems to get through the errors related to transpiling to ES5. I'm not sure if this would be classified as the same bug, but, after the b4 version, the aurelia-loader-default throws an error in ensureOriginOnExports. It thinks that target is null or undefined when it reaches the if statement. I can file a new bug if you prefer.
function ensureOriginOnExports(executed, name) { var target = executed; var key = void 0; var exportedValue = void 0;
if (target.__useDefault) { target = target['default']; }
@huochunpeng Are you available to look into this?
@dmongrel can you try reset the cache? au clear-cache
@bigopon I guess you did not see this error when testing on ie11?
Let me test this properly first. I'll update as soon as I finish that
It works totally fine in my local env. Here is how it looks like on IE11
With TS - Requirejs, for the following structure:
For the following app files:
OK, I think we can close this issue. I tried a default project, and at least that works now. Thanks. Au clear-cache had no apparent effect on the issue, which appears to be something else. I'll have to track it down (likely is plugin-related: I'm using aurelia-jstree and aurelia-dialog). Those are the only things that should really be different from the default project.
Turns out the default error comes up, when tsconfig.json has compilerOptions target es2015. I changed it to es5 and that solved the remaining issue. Please close this issue, everything is now running as it should be. If you'd like me to file a bug regarding the compiler option, let me know.
@dmongrel you can close it yourself (-:
I'm submitting a bug report
Please tell us about your environment:
Operating System: Windows 10
Node Version: 11.1.0
NPM Version: 6.1.0
Aurelia CLI OR JSPM OR Webpack AND Version CLI 1.0.0-beta.3
Browser: IE 11
Language: TypeScript 3.1.2
Current behavior: Aurelia fails to run in IE11. The aurelia-binding function camelCase() has a => which does not get transpiled to es5/es2015. In IE11, this causes a SCRIPT1002: Syntax error in vendor-bundle.js(6008,97)
Expected/desired behavior:
The fat arrow (=>) should be transpiled and not appear in vendor bundle, because IE11 cannot handle them. To reproduce, download aurelia-CLI, create a project, using TypeScript, no CSS, max-minification. My project has custom elements, so makes sure yours does as well.