(filePath)
| 3242 | projectRoot: config.root, |
| 3243 | resolver: { |
| 3244 | async read(filePath) { |
| 3245 | if (filePath === filename) { |
| 3246 | return src |
| 3247 | } |
| 3248 | |
| 3249 | const code = fs.readFileSync(filePath, 'utf-8') |
| 3250 | const lang = CSS_LANGS_RE.exec(filePath)?.[1] as |
| 3251 | | CssLang |
| 3252 | | undefined |
| 3253 | if (isPreProcessor(lang)) { |
| 3254 | const result = await compileCSSPreprocessors( |
| 3255 | environment, |
| 3256 | id, |
| 3257 | lang, |
| 3258 | code, |
| 3259 | workerController, |
| 3260 | ) |
| 3261 | result.deps?.forEach((dep) => deps.add(dep)) |
| 3262 | // TODO: support source map |
| 3263 | return result.code |
| 3264 | } else if (lang === 'sss') { |
| 3265 | const sssResult = await transformSugarSS(environment, id, code) |
| 3266 | // TODO: support source map |
| 3267 | return sssResult.code |
| 3268 | } |
| 3269 | return code |
| 3270 | }, |
| 3271 | async resolve(id, from) { |
| 3272 | const publicFile = checkPublicFile( |
| 3273 | id, |
nothing calls this directly
no test coverage detected