MCPcopy
hub / github.com/vitejs/vite / throwHtmlParseError

Function throwHtmlParseError

playground/vitestSetup.ts:114–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

112}
113
114function throwHtmlParseError() {
115 return {
116 name: 'vite-plugin-throw-html-parse-error',
117 configResolved(config: ResolvedConfig) {
118 const warn = config.logger.warn
119 config.logger.warn = (msg, opts) => {
120 // convert HTML parse warnings to make it easier to test
121 if (msg.includes('Unable to parse HTML;')) {
122 throw new Error(msg)
123 }
124 warn.call(config.logger, msg, opts)
125 }
126 },
127 }
128}
129// #endregion
130
131// eslint-disable-next-line no-empty-pattern

Callers 1

loadConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected