()
| 131 | name: 'rollup-plugin-inject-sentry-server-config', |
| 132 | |
| 133 | buildStart() { |
| 134 | const configPath = createResolver(nitro.options.rootDir).resolve(`/${serverConfigFile}`); |
| 135 | |
| 136 | if (!existsSync(configPath)) { |
| 137 | if (isDebug) { |
| 138 | debug.log(`[Sentry] Sentry server config file not found: ${configPath}`); |
| 139 | } |
| 140 | return; |
| 141 | } |
| 142 | |
| 143 | // Emitting a file adds it to the build output (Rollup is aware of the file, and we can later return the code in resolveId) |
| 144 | this.emitFile({ |
| 145 | type: 'chunk', |
| 146 | id: `${filePrefix}${serverConfigFile}`, |
| 147 | fileName: `${SERVER_CONFIG_FILENAME}.mjs`, |
| 148 | }); |
| 149 | }, |
| 150 | |
| 151 | resolveId(source) { |
| 152 | if (source.startsWith(filePrefix)) { |
nothing calls this directly
no test coverage detected