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

[feat][v2] automatically rebuild webview-dist #9580

Closed
pronebird opened this issue Apr 26, 2024 · 1 comment
Closed

[feat][v2] automatically rebuild webview-dist #9580

pronebird opened this issue Apr 26, 2024 · 1 comment

Comments

@pronebird
Copy link
Contributor

pronebird commented Apr 26, 2024

Describe the problem

Hi,

It seems that each time we change webview-src/index.ts we have to run npm run build manually to rebuild the webview-dist/index.d.ts.

Describe the solution you'd like

It would be great if tauri_plugin::Builder::new(COMMANDS).build() could automatically run npm run build when webview-src/*.ts contents change.

Alternatives considered

Modify build.rs and run npm run build manually, i.e:

const COMMANDS: &[&str] = &[ .. ];

fn main() {
    tauri_plugin::Builder::new(COMMANDS).build();

    println!("cargo:rerun-if-changed=webview-src");
    std::process::Command::new("npm")
        .arg("run")
        .arg("build")
        .spawn()
        .unwrap();
}

Additional context

No response

@amrbashir
Copy link
Member

I don't think we should add this because plugin authors could choose 1 of infinite number of ways to build their plugin frontend code. The alternative way should be used or manually build when you need.

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants