( imports: Set<string>, excludeSystemJS?: boolean, )
| 971 | const polyfillId = '\0vite/legacy-polyfills' |
| 972 | |
| 973 | function polyfillsPlugin( |
| 974 | imports: Set<string>, |
| 975 | excludeSystemJS?: boolean, |
| 976 | ): Plugin { |
| 977 | return { |
| 978 | name: 'vite:legacy-polyfills', |
| 979 | resolveId(id) { |
| 980 | if (id === polyfillId) { |
| 981 | return id |
| 982 | } |
| 983 | }, |
| 984 | load(id) { |
| 985 | if (id === polyfillId) { |
| 986 | return ( |
| 987 | [...imports].map((i) => `import ${JSON.stringify(i)};`).join('') + |
| 988 | (excludeSystemJS ? '' : `import "systemjs/dist/s.min.js";`) |
| 989 | ) |
| 990 | } |
| 991 | }, |
| 992 | } |
| 993 | } |
| 994 | |
| 995 | function prependModenChunkLegacyGuardPlugin(): Plugin { |
| 996 | let sourceMapEnabled!: boolean |
no outgoing calls
no test coverage detected