Import upstream changes (da32db2e67547e0f17b7132065559eba2b1d3513)

This commit is contained in:
Lit Robot
2023-09-18 18:21:55 +00:00
parent 7d36575cda
commit 78896ca3b3
2 changed files with 10 additions and 2 deletions

View File

@@ -123,11 +123,15 @@ npm run docs:watch
The site will usually be served at http://localhost:8000. 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 ## 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 ## More information

View File

@@ -23,6 +23,10 @@ export default {
plugins: [ plugins: [
replace({'Reflect.decorate': 'undefined'}), replace({'Reflect.decorate': 'undefined'}),
resolve(), resolve(),
/**
* This minification setup serves the static site generation.
* For bundling and minification, check the README.md file.
*/
terser({ terser({
ecma: 2017, ecma: 2017,
module: true, module: true,