vite-plugin-static-copy
vite-plugin-static-copy copied to clipboard
feature request: support URL objects
Modern Node.js APIs have first support for Web Standard URL objects, so it would be useful to have this interface in this plugin as well.
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { viteStaticCopy } from "vite-plugin-static-copy";
// https://vitejs.dev/config/
export default defineConfig({
base: "/fml-web/",
plugins: [
viteStaticCopy({
targets: [
{
src: new URL("lib/foo.wasm", import.meta.url),
dest: new URL(".", import.meta.url),
},
],
}),
react(),
],
});