diff --git a/packages/esbuild/lib/index.js b/packages/esbuild/lib/index.js index f19d738e9..943d4f923 100644 --- a/packages/esbuild/lib/index.js +++ b/packages/esbuild/lib/index.js @@ -13,7 +13,6 @@ * @typedef {ProcessorOptions & {allowDangerousRemoteMdx?: boolean}} Options */ -import {URL} from 'url' import assert from 'node:assert' import {promises as fs} from 'node:fs' import path from 'node:path' diff --git a/packages/esbuild/test/index.test.js b/packages/esbuild/test/index.test.js index 35f735aa0..ec93657c8 100644 --- a/packages/esbuild/test/index.test.js +++ b/packages/esbuild/test/index.test.js @@ -9,7 +9,7 @@ */ import {promises as fs} from 'fs' -import {URL, fileURLToPath} from 'url' +import {fileURLToPath} from 'url' import {test} from 'uvu' import * as assert from 'uvu/assert' import esbuild from 'esbuild' diff --git a/packages/loader/test/index.test.js b/packages/loader/test/index.test.js index a5adf06c6..ef6465f74 100644 --- a/packages/loader/test/index.test.js +++ b/packages/loader/test/index.test.js @@ -7,7 +7,7 @@ import {promises as fs} from 'fs' import {promisify} from 'util' -import {URL, fileURLToPath} from 'url' +import {fileURLToPath} from 'url' import {test} from 'uvu' import * as assert from 'uvu/assert' import webpack from 'webpack' diff --git a/packages/mdx/lib/plugin/recma-document.js b/packages/mdx/lib/plugin/recma-document.js index 6590e1d48..e0cedaf68 100644 --- a/packages/mdx/lib/plugin/recma-document.js +++ b/packages/mdx/lib/plugin/recma-document.js @@ -39,7 +39,6 @@ * JSX runtime to use. */ -import {URL} from 'url' import {analyze} from 'periscopic' import {stringifyPosition} from 'unist-util-stringify-position' import {positionFromEstree} from 'unist-util-position-from-estree' diff --git a/packages/node-loader/test/index.test.js b/packages/node-loader/test/index.test.js index b483f4c80..4139f9b83 100644 --- a/packages/node-loader/test/index.test.js +++ b/packages/node-loader/test/index.test.js @@ -3,7 +3,6 @@ */ import {promises as fs} from 'fs' -import {URL} from 'url' import {test} from 'uvu' import * as assert from 'uvu/assert' import React from 'react' diff --git a/packages/rollup/test/index.test.js b/packages/rollup/test/index.test.js index d187d9b49..bba77461f 100644 --- a/packages/rollup/test/index.test.js +++ b/packages/rollup/test/index.test.js @@ -3,7 +3,7 @@ */ import {promises as fs} from 'fs' -import {URL, fileURLToPath} from 'url' +import {fileURLToPath} from 'url' import {test} from 'uvu' import * as assert from 'uvu/assert' import {rollup} from 'rollup' diff --git a/website/bundle.js b/website/bundle.js index 3e0c7b81d..0fd3b122e 100644 --- a/website/bundle.js +++ b/website/bundle.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -import url from 'url' +import {fileURLToPath} from 'url' import process from 'process' import webpack from 'webpack' import ReactServerWebpackPlugin from 'react-server-dom-webpack/plugin' @@ -13,9 +13,7 @@ webpack( mode: production ? 'production' : 'development', devtool: production ? 'source-map' : 'cheap-module-source-map', entry: [ - url.fileURLToPath( - new URL('../docs/_asset/index.client.js', import.meta.url) - ) + fileURLToPath(new URL('../docs/_asset/index.client.js', import.meta.url)) ], output: { // RSC puts all chunks in `public/` (perhaps due to my weird doing), @@ -23,7 +21,7 @@ webpack( // `public/folder/chunk.js`, even though it’s at `public/chunk.js`. // This fixes that! publicPath: '/', - path: url.fileURLToPath(config.output), + path: fileURLToPath(config.output), filename: 'index.js' }, module: {