-
Notifications
You must be signed in to change notification settings - Fork 202
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
Remove browser field from package.json #260
Comments
Which might break Angular 6 again :/ We need to think this through first and then come up with a solution asap. Thanks for the report @ravikiran438 |
As mentioned in angular/angular-cli#10681 (comment) adding
to package.json in contentful-sdk-core or using https://github.com/CoderPuppy/os-browserify both seem to work fine with angular 6 builds I can send out a PR if you would like to add any of those workarounds. Thanks! |
Hey @ravikiran438, |
@Khaledgarbaya Please check the following PR contentful/contentful-sdk-core#62 |
…aking Starting Angular CLI 6.x, no empty modules are supplied for node globals, see: angular/angular-cli#9827 contentful/contentful.js#260
…aking Starting Angular CLI 6.x, no empty modules are supplied for node globals, see: angular/angular-cli#9827 #260
The use of the browser field in package.json is superfluous as it just points to a bundled file of all the modules and results in the inclusion of contentful.browser.js in the final webpack bundle thereby defeating the purpose of using es6 modules for tree shaking. The purpose of the browser field is to provide code that is specific to a browser (for example it uses polyfills or shims), but that is not relevant for this lib at present. For spec of browser field see: https://github.com/defunctzombie/package-browser-field-spec
Steps to Reproduce
Here is the relevant PR #247
Also same with contentful-management
contentful/contentful-management.js#171
The text was updated successfully, but these errors were encountered: