Comments (25)
I checked out rc1 and the issue today.
When I tested removing es6-shim
from bundle.js and adding it manually in the build directory, the error was gone.
Uglifying es6-shim
might have a problem. and 0.35.1(latest) was the same.
Anyway, from this idea, I adjusted es6-shim's position after system.js
and used es6-shim.js
instead of es6-shim.min.js
. That was a solution(walkaround).
<!-- 1. Load libraries -->
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.js"></script>
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/es6-shim/es6-shim.js"></script>
<!-- endbuild -->
I'll PR this soon.
--- update ---
Changing es6-shim.min.js to es6-shim.js was not necessary.
from angular-starter.
Hi, did it only happen using Safari? how about other browsers?
you can try SystemJS polyfills here
By the way I'm going to switch to SFX build (no systemjs in bundle) soon, can you try the sfx-build-2
branch and test against Safari?
Thanks for the report.
from angular-starter.
Thank you for your prompt response.
The error does happen only in Safari.
SystemJS polyfills are not solving the problem here.
Also the new SFX branch has the same error and an additional one:
reflect-metadata shim is required when using class decorators
from angular-starter.
By the way, it was working until beta.17
from angular-starter.
I don't know much about the reason but this might work.
I have inserted two js in the index.html
right before System.import
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
from angular-starter.
Is node_modules/angular2 folder there? isn't it now node_modules/@angular?
from angular-starter.
Sorry, I haven't tried rc1 yet. but you can do similar things.
from angular-starter.
I'll give it a try
from angular-starter.
Still getting the same error :(
from angular-starter.
how about gulp serve-dev
? is it only not working when bundled?
already try https://github.com/stefanpenner/es6-promise before systemjs script tag?
from angular-starter.
gulp serve-dev
works fine on Safari. it is the bundle that breaks.
Es6-promise didn't help either. I also tried es6-sham, es5-shim and es5-sham.
I tried the angular-cli new tool and it's build does run on safari. I really don't want to migrate the project there, and rather just find a solution for this problem with your starter.
from angular-starter.
okay, can you try to turn off either minify
or mangle
option in gulp.config.js
file?
from angular-starter.
I tried it before, just tried it again. no success.
from angular-starter.
I get it working by removing
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
Looks like I need to remove it in next release and just ask the IE users to add them manually
from angular-starter.
but then you get many other errors...
from angular-starter.
what kind of error did you get?
I used sfx-build-2
branch and just comment out es6-shim part in index, then serve build it, it run well on Safari Version 9.0 (11601.1.56)
I'd suggest to update your Safari version
from angular-starter.
When you remove the es6-shim, then the regular un-bundled version doesn't load (on sfx-build-2).
Also I get the same error when I build.
For my project also the bundled version generates many other errors if I don't include the es6-shim.
Sorry, this is a hard one!
from angular-starter.
Sorry, cannot help much without details and not reproducable in my side since it's indeed working.
I will leave it open for someone else having same issue or fix
from angular-starter.
I have the same issue. With these included
<script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.js"></script>
serve-dev works in all browsers, however serve-build breaks things in Safari and IE. If I remove es6-shim Safari works fine but IE is broken with the error
cannot redefine non-configurable property 'Reflect'
from angular-starter.
Feel free to open PR if you have a fix for this, thank you.
P.S: I still recommend using newer or modern browsers if possible, and I personally don't feel like supporting older IE browsers
from angular-starter.
The only way I can get it to work is too not bundle those scripts so it must be something to do with systemjs-builder but no idea what.
from angular-starter.
wow, it's great @kennyhyun , I look forward to it 👍
from angular-starter.
@talmog , can you confirm the fix?
from angular-starter.
Works for me.
from angular-starter.
confirmed! thank you!
from angular-starter.
Related Issues (20)
- problem between npm start and npm run build on style sheet HOT 2
- remove Todolist module HOT 2
- import { filter } from 'lodash'; HOT 2
- materialize (question) HOT 2
- npm run build no long deployes properly HOT 1
- npm run build is broken HOT 1
- Problem with report generation HOT 3
- No file change on the screen, despite recompile (RaydonZhu comment) HOT 7
- Serving from the root folder HOT 6
- Move the src folder contents HOT 2
- Update to typescript 2.1?
- where is tree shaking config? HOT 1
- lodash Partial - too old Typescript used HOT 1
- does it support lazy loading? HOT 1
- Lazy loading HOT 1
- Can't start freshly cloned project. HOT 4
- Debug TS files not working in Chrome HOT 2
- How do I switch this project to support universial HOT 1
- Will it work with Visual Studio . I tried but facing some unexpected token errors while loading files HOT 6
- Upgrade to Angular 5 causing remap-istanbul html report generation to fail HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-starter.