Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/plugin-vite/src/plugins/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import babelReact from "@babel/preset-react";
import { inlineEnvVarsPlugin } from "./patches/inline_env_vars.ts";
import { removePolyfills } from "./patches/remove_polyfills.ts";
import { JS_REG, JSX_REG } from "../utils.ts";
import { denoGlobal } from "./patches/deno_global.ts";
import { codeEvalPlugin } from "./patches/code_eval.ts";

export function patches(): Plugin {
Expand Down Expand Up @@ -44,10 +43,6 @@ export function patches(): Plugin {
inlineEnvVarsPlugin(env, Deno.env.toObject()),
];

if (!options?.ssr) {
plugins.push(denoGlobal);
}

const res = babel.transformSync(code, {
filename: id,
babelrc: false,
Expand Down
36 changes: 0 additions & 36 deletions packages/plugin-vite/src/plugins/patches/deno_global.ts

This file was deleted.

24 changes: 0 additions & 24 deletions packages/plugin-vite/tests/build_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,30 +408,6 @@ Deno.test({
sanitizeResources: false,
});

Deno.test({
name: "vite build - throw when using Deno.* global inside an island",
fn: async () => {
const fixture = path.join(FIXTURE_DIR, "deno_global_island");

await expect(buildVite(fixture)).rejects.toThrow(
"The Deno.* global cannot be used in the browser",
);
},
sanitizeOps: false,
sanitizeResources: false,
});

Deno.test({
name: "vite build - don't throw when using Deno.* global in ssr",
fn: async () => {
const fixture = path.join(FIXTURE_DIR, "deno_global_ssr");

await buildVite(fixture);
},
sanitizeOps: false,
sanitizeResources: false,
});

Deno.test({
name: "vite build - static index.html",
fn: async () => {
Expand Down
Loading