scullyio / scully

The Static Site Generator for Angular apps
https://scully.io/
MIT License
2.55k stars 257 forks source link

PrismJS WARNING #882

Closed stevermeister closed 4 years ago

stevermeister commented 4 years ago

🐞 Bug report

Getting a strange warning from Angular.

🔬 Minimal Reproduction

I've installed PrismJs by this manual - https://scully.io/docs/learn/utilities/syntax-highlighting/prism-js/

🔥 Exception or Error

WARNING in .../blog/src/app/highlight.service.ts depends on 'prismjs/plugins/copy-to-clipboard/prism-copy-to-clipboard'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
SanderElias commented 4 years ago

This warning has nothing to do with Scully. It tells you that the part of prism you loaded into your application isn't a proper ESM module, but a commonJS one. This is a new warning from that Angular CLI. see this for details

stevermeister commented 4 years ago

I also thought that it's nothing to do with Scully directly, but as far as it happens after step-by-step Scully guide (scully.io/docs/learn/utilities/syntax-highlighting/prism-js) I would put a comment on that page