Skip to content

Commit 9d2ccca

Browse files
committed
fix: import vue.config.mjs on windows
1 parent b0e7bf0 commit 9d2ccca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/@vue/cli-service/lib/util/loadFileConfig.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const fs = require('fs')
22
const path = require('path')
3+
const URL = require('url')
34

45
const isFileEsm = require('is-file-esm')
56
const { loadModule } = require('@vue/cli-shared-utils')
@@ -25,7 +26,7 @@ module.exports = function loadFileConfig (context) {
2526
const { esm } = isFileEsm.sync(fileConfigPath)
2627

2728
if (esm) {
28-
fileConfig = import(fileConfigPath)
29+
fileConfig = import(URL.pathToFileURL(fileConfigPath).href)
2930
} else {
3031
fileConfig = loadModule(fileConfigPath, context)
3132
}

0 commit comments

Comments
 (0)