]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: modify the way to get __dirname (#1727) [skip ci]
authorA SOUL <59335580+140948940@users.noreply.github.com>
Wed, 8 Mar 2023 19:45:03 +0000 (03:45 +0800)
committerGitHub <noreply@github.com>
Wed, 8 Mar 2023 19:45:03 +0000 (20:45 +0100)
Co-authored-by: Eduardo San Martin Morote <posva13@gmail.com>
packages/router/rollup.config.mjs

index d4b1f2d959f2e12ae1c17aa21367051c401c9f8a..a0dd7b387b309d3217a7b5b6928ee95be252d495 100644 (file)
@@ -1,17 +1,17 @@
 import path from 'node:path'
+import { fileURLToPath } from 'node:url'
 import { promises as fsp } from 'node:fs'
-import {dirname} from 'node:path'
 import ts from 'rollup-plugin-typescript2'
 import replace from '@rollup/plugin-replace'
 import resolve from '@rollup/plugin-node-resolve'
 import commonjs from '@rollup/plugin-commonjs'
 import chalk from 'chalk'
 import pkg from './package.json' assert { type: 'json' }
-import {terser} from 'rollup-plugin-terser'
+import { terser } from 'rollup-plugin-terser'
 
 const name = pkg.name
 
-const __dirname = dirname(new URL(import.meta.url).pathname)
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
 
 const banner = `/*!
   * ${pkg.name} v${pkg.version}