Skip to content

Commit

Permalink
fix: windows vue.config.mjs support (#7023)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxiangmoe authored Mar 31, 2022
1 parent a3ccc3d commit dded73a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@vue/cli-service/lib/util/loadFileConfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs')
const path = require('path')

const { pathToFileURL } = require('url')
const isFileEsm = require('is-file-esm')
const { loadModule } = require('@vue/cli-shared-utils')

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

if (esm) {
fileConfig = import(fileConfigPath)
fileConfig = import(pathToFileURL(fileConfigPath))
} else {
fileConfig = loadModule(fileConfigPath, context)
}
Expand Down

0 comments on commit dded73a

Please sign in to comment.