Remove framework URL script injection

This commit is contained in:
hensm
2026-03-14 16:40:25 +00:00
parent 6cdd0e548e
commit fd440b2983
5 changed files with 23 additions and 103 deletions

View File

@@ -49,26 +49,8 @@ export default opts => {
return {
name: "copy-files",
setup(build) {
/** First run for the set of import paths in each build. */
let isFirstRun = true;
build.onResolve({ filter: /.*/ }, () => {
/**
* Attach watch files to first resolve result.
* Presumably there is a much better way of doing
* this?
*/
if (isFirstRun) {
isFirstRun = false;
return {
watchFiles: matchingPaths
};
}
});
build.onEnd(() => {
isFirstRun = true;
// Copy any watched files that changed
// Copy any source files that changed
for (const srcPath of matchingPaths) {
const destPath = path.resolve(
opts.dest,