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

chore: compile resolve-url-loader #21351

Merged
merged 4 commits into from Jan 19, 2021
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
2 changes: 1 addition & 1 deletion packages/next/build/webpack/config/blocks/css/index.ts
Expand Up @@ -53,7 +53,7 @@ export const css = curry(async function css(
// To fix this, we use `resolve-url-loader` to rewrite the CSS
// imports to real file paths.
{
loader: require.resolve('resolve-url-loader'),
loader: require.resolve('next/dist/compiled/resolve-url-loader'),
options: {
// Source maps are not required here, but we may as well emit
// them.
Expand Down
1 change: 1 addition & 0 deletions packages/next/compiled/resolve-url-loader/engine/fail.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/compiled/resolve-url-loader/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/compiled/resolve-url-loader/package.json
@@ -0,0 +1 @@
{"name":"resolve-url-loader","main":"index.js","author":"bholloway","license":"MIT"}
2 changes: 1 addition & 1 deletion packages/next/package.json
Expand Up @@ -93,7 +93,6 @@
"raw-body": "2.4.1",
"react-is": "16.13.1",
"react-refresh": "0.8.3",
"resolve-url-loader": "3.1.2",
"stream-browserify": "3.0.0",
"style-loader": "1.2.1",
"styled-jsx": "3.3.2",
Expand Down Expand Up @@ -216,6 +215,7 @@
"postcss-preset-env": "6.7.0",
"postcss-scss": "3.0.4",
"recast": "0.18.5",
"resolve-url-loader": "3.1.2",
"sass-loader": "10.0.5",
"schema-utils": "2.7.1",
"semver": "7.3.2",
Expand Down
11 changes: 11 additions & 0 deletions packages/next/taskfile.js
Expand Up @@ -433,6 +433,16 @@ export async function ncc_recast(task, opts) {
.target('compiled/recast')
}
// eslint-disable-next-line camelcase
externals['resolve-url-loader'] = 'next/dist/compiled/resolve-url-loader'
export async function ncc_resolve_url_loader(task, opts) {
await task
.source(
opts.src || relative(__dirname, require.resolve('resolve-url-loader'))
)
.ncc({ packageName: 'resolve-url-loader', externals })
.target('compiled/resolve-url-loader')
}
// eslint-disable-next-line camelcase
externals['sass-loader'] = 'next/dist/compiled/sass-loader'
export async function ncc_sass_loader(task, opts) {
await task
Expand Down Expand Up @@ -686,6 +696,7 @@ export async function ncc(task) {
'ncc_postcss_preset_env',
'ncc_postcss_scss',
'ncc_recast',
'ncc_resolve_url_loader',
'ncc_sass_loader',
'ncc_schema_utils',
'ncc_schema_utils3',
Expand Down