Skip to content
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

Publishing configuration for sitecore-jss-angular gives errors for Angular 9 ngcc #348

Closed
evtk opened this issue Mar 22, 2020 · 4 comments · Fixed by #370
Closed

Publishing configuration for sitecore-jss-angular gives errors for Angular 9 ngcc #348

evtk opened this issue Mar 22, 2020 · 4 comments · Fixed by #370
Assignees

Comments

@evtk
Copy link

evtk commented Mar 22, 2020

Description

When using the latest @sitecore-jss/sitecore-jss-angular package with Angular 9, the ngcc compatiblity provider runs on an error. The issue here is that the sitecore-jss-angular package contains 2 package.json files.

I have opened up an issue on the Angular issue tracker, receiving quick response over there, with straightforward solutions.

Expected behavior

The ngcc should not error out on this package.

Possible Fix

The options to have this fixed (taken from the Angular issue thread):

  1. Adjust the publishing to only publish dist. You are using Lerna where this was not possible in the past, but their should be support for now.
  2. Include an ngcc configuration file in the repo next to package.json:

module.exports = { entryPoints: { './dist': { ignore: true, }, }, };

@sc-antonkulagin
Copy link
Contributor

Added ngcc.config in #370

@evtk
Copy link
Author

evtk commented Aug 27, 2020

I believe the added commit with config is incorrect, it should be:

module.exports = {
  packages: {
    entryPoints: {
      './dist': {
        ignore: true,
      },
    },
  },
};

@evtk
Copy link
Author

evtk commented Aug 27, 2020

@sc-antonkulagin can this be re-opened? thanks!

@evtk
Copy link
Author

evtk commented Aug 27, 2020

I believe this error (with angular differential loading enabled) is related:

/node_modules/@sitecore-jss/sitecore-jss-angular/__ivy_ngcc__/dist/esm2015/public_api.js depends on '@sitecore-jss/sitecore-jss'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

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 a pull request may close this issue.

3 participants