Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of URL from url #1976

Merged
merged 5 commits into from Mar 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/esbuild/lib/index.js
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/esbuild/test/index.test.js
Expand Up @@ -9,7 +9,7 @@
*/

import {promises as fs} from 'fs'
import {URL, fileURLToPath} from 'url'
zfben marked this conversation as resolved.
Show resolved Hide resolved
import {fileURLToPath} from 'url'
import {test} from 'uvu'
import * as assert from 'uvu/assert'
import esbuild from 'esbuild'
Expand Down
2 changes: 1 addition & 1 deletion packages/loader/test/index.test.js
Expand Up @@ -7,7 +7,7 @@

import {promises as fs} from 'fs'
import {promisify} from 'util'
import {URL, fileURLToPath} from 'url'
zfben marked this conversation as resolved.
Show resolved Hide resolved
import {fileURLToPath} from 'url'
import {test} from 'uvu'
import * as assert from 'uvu/assert'
import webpack from 'webpack'
Expand Down
1 change: 0 additions & 1 deletion packages/mdx/lib/plugin/recma-document.js
Expand Up @@ -39,7 +39,6 @@
* JSX runtime to use.
*/

import {URL} from 'url'
zfben marked this conversation as resolved.
Show resolved Hide resolved
import {analyze} from 'periscopic'
import {stringifyPosition} from 'unist-util-stringify-position'
import {positionFromEstree} from 'unist-util-position-from-estree'
Expand Down
1 change: 0 additions & 1 deletion packages/node-loader/test/index.test.js
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/rollup/test/index.test.js
Expand Up @@ -3,7 +3,7 @@
*/

import {promises as fs} from 'fs'
import {URL, fileURLToPath} from 'url'
zfben marked this conversation as resolved.
Show resolved Hide resolved
import {fileURLToPath} from 'url'
import {test} from 'uvu'
import * as assert from 'uvu/assert'
import {rollup} from 'rollup'
Expand Down
8 changes: 3 additions & 5 deletions website/bundle.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import url from 'url'
zfben marked this conversation as resolved.
Show resolved Hide resolved
import {fileURLToPath} from 'url'
import process from 'process'
import webpack from 'webpack'
import ReactServerWebpackPlugin from 'react-server-dom-webpack/plugin'
Expand All @@ -13,17 +13,15 @@ webpack(
mode: production ? 'production' : 'development',
devtool: production ? 'source-map' : 'cheap-module-source-map',
entry: [
url.fileURLToPath(
zfben marked this conversation as resolved.
Show resolved Hide resolved
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),
// but on a page `public/folder/index.html`, RSC/WP will then load
// `public/folder/chunk.js`, even though it’s at `public/chunk.js`.
// This fixes that!
publicPath: '/',
path: url.fileURLToPath(config.output),
zfben marked this conversation as resolved.
Show resolved Hide resolved
path: fileURLToPath(config.output),
filename: 'index.js'
},
module: {
Expand Down