Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix esbuild #5629

Merged
merged 8 commits into from
Sep 20, 2023
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
10 changes: 1 addition & 9 deletions gradio/cli/commands/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,7 @@ def dev(
)

print(f":recycle: [green]Launching[/] {app} in reload mode\n")
print(
gradio_node_path,
"--component-directory",
component_directory,
"--root",
gradio_template_path,
"--app",
str(app),
)

proc = subprocess.Popen(
[
"node",
Expand Down
7 changes: 5 additions & 2 deletions js/preview/src/dev_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const __dirname = fileURLToPath(new URL(".", import.meta.url));
import { svelte } from "@sveltejs/vite-plugin-svelte";
import { transform } from "sucrase";
import { viteCommonjs } from "@originjs/vite-plugin-commonjs";
import sucrase from "@rollup/plugin-sucrase";

const vite_messages_to_ignore = [
"Default and named imports from CSS files are deprecated."
Expand Down Expand Up @@ -40,7 +41,6 @@ export async function create_server({
const NODE_DIR = join(root_dir, "..", "..", "node", "dev");

try {
console.log("Atttempting to start server...");
const server = await createServer({
// any valid user config options, plus `mode` and `configFile`
esbuild: false,
Expand Down Expand Up @@ -102,6 +102,10 @@ export async function create_server({
);
}
},
sucrase({
transforms: ["typescript"],
include: ["**/*.ts", "**/*.tsx"]
}),
//@ts-ignore
svelte({
onwarn(warning, handler) {
Expand Down Expand Up @@ -147,7 +151,6 @@ export async function create_server({
`[orange3]Frontend Server[/] (Go here): ${server.resolvedUrls?.local}`
);
} catch (e) {
console.log("Error starting server:");
console.error(e);
}
}
Expand Down
1 change: 0 additions & 1 deletion js/utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from "./color";
export * from "./utils";
export * from "./types";
1 change: 0 additions & 1 deletion js/utils/src/types.ts

This file was deleted.

Loading