|
1 |
| -import { pathToFileURL } from "node:url"; |
2 |
| -import { resolve, join, isAbsolute } from "pathe"; |
| 1 | +import { resolve, join, normalize } from "pathe"; |
3 | 2 | import { loadConfig } from "c12";
|
4 | 3 | import { klona } from "klona/full";
|
5 | 4 | import { camelCase } from "scule";
|
@@ -218,16 +217,6 @@ export async function loadOptions(
|
218 | 217 | );
|
219 | 218 | }
|
220 | 219 |
|
221 |
| - // Normalise absolute auto-import paths for windows machines |
222 |
| - if (options.imports && options.dev) { |
223 |
| - options.imports.imports = options.imports.imports || []; |
224 |
| - for (const entry of options.imports.imports) { |
225 |
| - if (isAbsolute(entry.from)) { |
226 |
| - entry.from = pathToFileURL(entry.from).href; |
227 |
| - } |
228 |
| - } |
229 |
| - } |
230 |
| - |
231 | 220 | // Add h3 auto imports preset
|
232 | 221 | if (options.imports) {
|
233 | 222 | const h3Exports = await resolveModuleExportNames("h3", {
|
@@ -329,13 +318,7 @@ export async function loadOptions(
|
329 | 318 | }
|
330 | 319 |
|
331 | 320 | // Resolve plugin paths
|
332 |
| - options.plugins = options.plugins.map((p) => { |
333 |
| - const path = resolvePath(p, options); |
334 |
| - if (options.dev && isAbsolute(path)) { |
335 |
| - return pathToFileURL(path).href; |
336 |
| - } |
337 |
| - return path; |
338 |
| - }); |
| 321 | + options.plugins = options.plugins.map((p) => resolvePath(p, options)); |
339 | 322 |
|
340 | 323 | return options;
|
341 | 324 | }
|
|
0 commit comments