@remcovaes/web-test-runner-vite-plugin
Version:
@web/test-runner plugin to allow the build to be done by Vite
12 lines (11 loc) • 303 B
JavaScript
/**
* Rollup/Vite plugin to call callback with all file names.
* Useful when you want to add files that where built to a watcher
* @param { (fileName: string) => void } callback
* */
export const callWithFileNames = (callback) => ({
name: 'file-name',
transform(src, id) {
callback(id);
},
});