Skip to content

Commit

Permalink
refactor(config): replace fs.promises with fsp (#13427)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsypower authored Jun 5, 2023
1 parent b93242e commit 1e299cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ async function bundleConfigFile(
name: 'inject-file-scope-variables',
setup(build) {
build.onLoad({ filter: /\.[cm]?[jt]s$/ }, async (args) => {
const contents = await fs.promises.readFile(args.path, 'utf8')
const contents = await fsp.readFile(args.path, 'utf8')
const injectValues =
`const ${dirnameVarName} = ${JSON.stringify(
path.dirname(args.path),
Expand Down

0 comments on commit 1e299cc

Please sign in to comment.