Skip to content

Commit

Permalink
make 'module' and 'imports' conditions synonymous
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksrandall committed Dec 14, 2021
1 parent c89382f commit f72f1e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/wrangler/src/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,14 @@ function useEsbuild(props: {
...(jsxFactory && { jsxFactory }),
...(jsxFragment && { jsxFragment }),
external: ["__STATIC_CONTENT_MANIFEST"],
conditions: ["worker", "browser", "development", "module", "default"],
conditions: [
"worker",
"browser",
"development",
"module",
"imports",
"default",
],
plugins: [moduleCollector.plugin],
// TODO: import.meta.url
watch: {
Expand Down
1 change: 1 addition & 0 deletions packages/wrangler/src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export default async function publish(props: Props): Promise<void> {
"browser",
envName === "production" ? "production" : false,
"module",
"imports",
"default",
].filter(Boolean) as string[],
loader: {
Expand Down

0 comments on commit f72f1e0

Please sign in to comment.