Skip to content

Commit

Permalink
remove silencing hack when console.warn hack would be sufficient
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJakubowicz committed Nov 8, 2023
1 parent 1d82c04 commit be66c4e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/lit-dev-content/site/docs/v3/tools/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,6 @@ If you’re seeing a `Multiple versions of Lit loaded` development mode warning,

5. If there is still duplication, you may need to delete your package lock and `node_modules`. Then install the version of `lit` you want explicitly, followed by your dependencies.

If you want to silence the warning, add the following code early in your application before Lit has been loaded to initialize the global `litIssuedWarnings` set, and preemptively add the warning to the set.

```html
<script>
window.litIssuedWarnings = new Set();
// By adding the Lit warning to this global set, Lit will no longer emit the multiple versions warning.
window.litIssuedWarnings.add(
'Multiple versions of Lit loaded. Loading multiple versions is not recommended. See https://lit.dev/msg/multiple-versions for more information.'
);
</script>
```

## Local dev servers { #devserver }

Expand Down

0 comments on commit be66c4e

Please sign in to comment.