main
| 1 | import type { Plugin } from "vite" |
| 2 | import { writeStaticFiles as writeStaticFilesUtils } from "../utils/write-static-files" |
| 3 | |
| 4 | interface WriteStaticFilesPluginOptions { |
| 5 | plugins?: string[] |
| 6 | } |
| 7 | |
| 8 | export const writeStaticFiles = ( |
| 9 | options: WriteStaticFilesPluginOptions |
| 10 | ): Plugin => { |
| 11 | return { |
| 12 | name: "medusa:write-static-files", |
| 13 | buildStart: async (ctx) => { |
| 14 | await writeStaticFilesUtils(options.plugins) |
| 15 | }, |
| 16 | } |
| 17 | } |