From 78896ca3b364fae6ea90a20d21bdad3240cc11ce Mon Sep 17 00:00:00 2001 From: Lit Robot Date: Mon, 18 Sep 2023 18:21:55 +0000 Subject: [PATCH] Import upstream changes (da32db2e67547e0f17b7132065559eba2b1d3513) --- README.md | 8 ++++++-- rollup.config.js | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 53fa699..e1f782a 100644 --- a/README.md +++ b/README.md @@ -123,11 +123,15 @@ npm run docs:watch The site will usually be served at http://localhost:8000. +**Note**: The project uses Rollup to bundle and minify the source code for the docs site and not to publish to NPM. For bundling and minification, check the [Bundling and minification](#bundling-and-minification) section. + ## Bundling and minification -This starter project doesn't include any build-time optimizations like bundling or minification. We recommend publishing components as unoptimized JavaScript modules, and performing build-time optimizations at the application level. This gives build tools the best chance to deduplicate code, remove dead code, and so on. +As stated in the [static site generation](#static-site) section, the bundling and minification setup in the Rollup configuration in this project is there specifically for the docs generation. -For information on building application projects that include LitElement components, see [Build for production](https://lit.dev/docs/tools/production/) on the Lit site. +We recommend publishing components as unoptimized JavaScript modules and performing build-time optimizations at the application level. This gives build tools the best chance to deduplicate code, remove dead code, and so on. + +Please check the [Publishing best practices](https://lit.dev/docs/tools/publishing/#publishing-best-practices) for information on publishing reusable Web Components, and [Build for production](https://lit.dev/docs/tools/production/) for building application projects that include LitElement components, on the Lit site. ## More information diff --git a/rollup.config.js b/rollup.config.js index a00e9b8..1128995 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -23,6 +23,10 @@ export default { plugins: [ replace({'Reflect.decorate': 'undefined'}), resolve(), + /** + * This minification setup serves the static site generation. + * For bundling and minification, check the README.md file. + */ terser({ ecma: 2017, module: true,