Skip to content

Commit

Permalink
chore: fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored and LarsDenBakker committed Jun 19, 2022
1 parent fee4572 commit 78d610d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/chatty-ghosts-argue.md
@@ -0,0 +1,6 @@
---
'@web/dev-server-rollup': patch
'@web/dev-server': patch
---

Update Rollup, use moduleSideEffects flag
Expand Up @@ -38,6 +38,7 @@ export function createRollupPluginContextAdapter<
isEntry: false,
isExternal: false,
isIncluded: false,
hasModuleSideEffects: false,
moduleSideEffects: false,
syntheticNamedExports: false,
meta: pluginMetaPerModule.get(id) ?? {},
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-server-rollup/src/rollupAdapter.ts
Expand Up @@ -295,7 +295,7 @@ export function rollupAdapter(
if (typeof result === 'string') {
return { body: result, type: 'js' };
}
if (typeof result?.code === 'string') {
if (result != null && typeof result?.code === 'string') {
savePluginMeta(filePath, result);
return { body: result.code, type: 'js' };
}
Expand Down

0 comments on commit 78d610d

Please sign in to comment.