(options)
| 40 | return { |
| 41 | name: 'copy-plugin-modules', |
| 42 | writeBundle(options) { |
| 43 | const outDir = options.dir || 'dist'; |
| 44 | const assetsDir = path.join(outDir, 'assets'); |
| 45 | |
| 46 | if (!fs.existsSync(assetsDir)) { |
| 47 | fs.mkdirSync(assetsDir, { recursive: true }); |
| 48 | } |
| 49 | |
| 50 | for (const mod of modulePaths) { |
| 51 | if (!fs.existsSync(mod.path)) { |
| 52 | console.warn(`[copy-plugin-modules] ${mod.name} dist not found: ${mod.path}`); |
| 53 | continue; |
| 54 | } |
| 55 | copyJsFilesRecursively(mod.path, assetsDir); |
| 56 | } |
| 57 | } |
| 58 | }; |
| 59 | } |
| 60 |
nothing calls this directly
no test coverage detected