Skip to content

Commit dded73a

Browse files
authored
fix: windows vue.config.mjs support (#7023)
1 parent a3ccc3d commit dded73a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require('fs')
22
const path = require('path')
3-
3+
const { pathToFileURL } = require('url')
44
const isFileEsm = require('is-file-esm')
55
const { loadModule } = require('@vue/cli-shared-utils')
66

@@ -25,7 +25,7 @@ module.exports = function loadFileConfig (context) {
2525
const { esm } = isFileEsm.sync(fileConfigPath)
2626

2727
if (esm) {
28-
fileConfig = import(fileConfigPath)
28+
fileConfig = import(pathToFileURL(fileConfigPath))
2929
} else {
3030
fileConfig = loadModule(fileConfigPath, context)
3131
}

0 commit comments

Comments
 (0)