Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

remove core-js/ import#1030

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
guyonroche merged 1 commit intoexceljs:masterfrombleuscyther:master
Dec 12, 2019
Merged

Conversation

bleuscyther
Copy link
Contributor

This affects angular. Because core-js is imported inside the library , the Promise polyfill is in conflict with zone.js. Since Excel.js puts browsers compatibility on the hands of the devs. (link) , we can add it manually in a way that does not conflict with Angular.

this PR shouldfix :#1008

This was fixe din many other package and is referenced here:
angular/zone.js#783

javico2609, Clement-Oliva, PatrykCholewa, nknotts, and altso reacted with thumbs up emoji
@guyonroche
Copy link
Collaborator

@bleuscyther - I'm tending to agree - though I might go one step further and remove the regenerator-runtime/runtime require as well, leaving the whole task of polyfill support to the app in question. What do you think?

bleuscyther, SpeedoPasanen, nknotts, and samclaus reacted with thumbs up emoji

@bleuscyther
Copy link
ContributorAuthor

that would be perfect.

SpeedoPasanen, nknotts, and samclaus reacted with thumbs up emoji

@guyonrocheguyonroche merged commit50d02ef intoexceljs:masterDec 12, 2019
@guyonroche
Copy link
Collaborator

@bleuscyther I've just merged - I'm going to make one further change... In order to avoid breaking changes, I'm going to copy exceljs.browser.js to exceljs.bare.js that removes all polyfills and restore exceljs.browser.js to keep them. To include the exceljs bundle without pollys, just change the import from dist/exceljs.min.js to dist/exceljs.bare.min.js

bleuscyther reacted with thumbs up emoji

@bleuscyther
Copy link
ContributorAuthor

Nice i am going to test this week

@bleuscyther
Copy link
ContributorAuthor

bleuscyther commentedDec 13, 2019
edited
Loading

There was a new error:

Uncaught ReferenceError: regeneratorRuntime is not defined

from what i see this is a babel issue related to how the file was built.babel/babel#9849

As a quick fix, I installed the missing package :

npm install regenerator-runtime

and put the import in the polyfill for now:

// ./src/polyfill.tsimport"regenerator-runtime/runtime";

Using angular i had to do the usual additional changes (tested on version 8), it works fine after that

// ./tsconfig.json..."module":"esnext","moduleResolution":"node","emitDecoratorMetadata":true,"experimentalDecorators":true,"importHelpers":true,"allowSyntheticDefaultImports":true,"target":"es2015","paths":{"exceljs":["../node_modules/exceljs/dist/exceljs.bare"],..

Check this(link) for additional configs and updated values/fields.

...// ./angular.json..."architect":{"build":{"builder":"@angular-devkit/build-angular:browser","options":{                ..."scripts":[                  ..."./node_modules/exceljs/dist/exceljs.bare.js"]...
//my .component.tsimport*asExcelJSfrom'exceljs/dist/exceljs.bare.js';import{Row,Workbook,Worksheet}from'exceljs';...constworkbook:Workbook=newExcelJS.Workbook();// Important don' t use Class directly the wrong module will be loaded
altso and kalyanmantri reacted with thumbs up emoji

@guyonroche
Copy link
Collaborator

@bleuscyther
Great you got it working - does this leave any changes required for ExcelJS?
My thoughts are that the 'bare' option leaves all the polyfill dependencies for the app to fetch - including "regenerator-runtime/runtime" - though I should probably add this to the readme

bleuscyther reacted with thumbs up emoji

@bleuscyther
Copy link
ContributorAuthor

Probably add it on the Readme. Thank you for your help.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
1 more reviewer

@SpeedoPasanenSpeedoPasanenSpeedoPasanen approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

"Zone.js has detected that ZoneAwarePromise(window|global).Promise has been overwritten
3 participants
@bleuscyther@guyonroche@SpeedoPasanen

[8]ページ先頭

©2009-2025 Movatter.jp