Skip to content

Commit

Permalink
set isolation mode to true for Lit renderer plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Mar 10, 2024
1 parent f875a14 commit 28aef56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/plugin-renderer-lit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ customElements.define('artists-page', ArtistsPage);
export const tagName = 'artists-page';
```

> _By default, this plugin sets `isolation` mode to `true` for all SSR pages. See the [isolation configuration](https://www.greenwoodjs.io/docs/configuration/#isolation) docs for more information._
## Caveats

There are a few considerations to take into account when using a `LitElement` as your page component:
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-renderer-lit/src/execute-route-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function executeRouteModule({ moduleUrl, compilation, page, prerender, htm
data.html = await getTemplateResultString(templateResult);
} else {
const module = await import(moduleUrl).then(module => module);
const { getTemplate = null, getBody = null, getFrontmatter = null, isolation } = module;
const { getTemplate = null, getBody = null, getFrontmatter = null, isolation = true } = module;

// TODO cant we get these from just pulling from the file during the graph phase?
// https://github.com/ProjectEvergreen/greenwood/issues/991
Expand Down

0 comments on commit 28aef56

Please sign in to comment.