Commit 2e516901 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

avoid sending modules in parent for dynamic imports (vercel/turbo#4056)

### Description

Keeps track of available modules when importing new chunk groups. Omits
assets that are already available in the parent chunk group(s) when
determining assets to be included in chunks.

### Testing Instructions

Dynamic imports should not include modules that are already in the
parent chunks

<!--
  When the below is checked (default) our PR bot will automatically
  assign labels to your PR based on the content to help the team
  organize and review it faster.
-->

- [x] Auto label
fixes WEB-599
parent 4bea437c
import { createProxy } from "next/dist/build/webpack/loaders/next-flight-loader/module-proxy"; import { createProxy } from "next/dist/build/webpack/loaders/next-flight-loader/module-proxy";
("TURBOPACK { chunking-type: parallel }"); ("TURBOPACK { chunking-type: isolatedParallel }");
// @ts-expect-error CLIENT_MODULE is provided by rust // @ts-expect-error CLIENT_MODULE is provided by rust
import { __turbopack_module_id__ as id } from "CLIENT_MODULE"; import { __turbopack_module_id__ as id } from "CLIENT_MODULE";
......
...@@ -593,7 +593,7 @@ impl AppRendererVc { ...@@ -593,7 +593,7 @@ impl AppRendererVc {
for (_, imports) in segments.iter() { for (_, imports) in segments.iter() {
for (p, identifier, chunks_identifier) in imports.values() { for (p, identifier, chunks_identifier) in imports.values() {
result += r#"("TURBOPACK { transition: next-layout-entry; chunking-type: parallel }"); result += r#"("TURBOPACK { transition: next-layout-entry; chunking-type: isolatedParallel }");
"#; "#;
writeln!( writeln!(
result, result,
......
use anyhow::Result; use anyhow::Result;
use turbo_tasks::primitives::StringVc; use turbo_tasks::{primitives::StringVc, Value};
use turbopack::ecmascript::chunk::{ use turbopack::ecmascript::chunk::{
EcmascriptChunkItemVc, EcmascriptChunkPlaceable, EcmascriptChunkPlaceableVc, EcmascriptChunkVc, EcmascriptChunkItemVc, EcmascriptChunkPlaceable, EcmascriptChunkPlaceableVc, EcmascriptChunkVc,
EcmascriptExportsVc, EcmascriptExportsVc,
}; };
use turbopack_core::{ use turbopack_core::{
asset::{Asset, AssetContentVc, AssetVc}, asset::{Asset, AssetContentVc, AssetVc},
chunk::{ChunkVc, ChunkableAsset, ChunkableAssetVc, ChunkingContextVc}, chunk::{
availability_info::AvailabilityInfo, ChunkVc, ChunkableAsset, ChunkableAssetVc,
ChunkingContextVc,
},
ident::AssetIdentVc, ident::AssetIdentVc,
reference::AssetReferencesVc, reference::AssetReferencesVc,
}; };
...@@ -43,8 +46,12 @@ impl Asset for InChunkingContextAsset { ...@@ -43,8 +46,12 @@ impl Asset for InChunkingContextAsset {
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl ChunkableAsset for InChunkingContextAsset { impl ChunkableAsset for InChunkingContextAsset {
#[turbo_tasks::function] #[turbo_tasks::function]
fn as_chunk(&self, _context: ChunkingContextVc) -> ChunkVc { fn as_chunk(
EcmascriptChunkVc::new(self.chunking_context, self.asset).into() &self,
_context: ChunkingContextVc,
availability_info: Value<AvailabilityInfo>,
) -> ChunkVc {
EcmascriptChunkVc::new(self.chunking_context, self.asset, availability_info).into()
} }
} }
......
use anyhow::{bail, Result}; use anyhow::{bail, Result};
use indoc::formatdoc; use indoc::formatdoc;
use serde_json::Value; use turbo_tasks::{primitives::StringVc, TryJoinIterExt, Value};
use turbo_tasks::{primitives::StringVc, TryJoinIterExt, ValueToString, ValueToStringVc};
use turbo_tasks_fs::FileSystemPathVc; use turbo_tasks_fs::FileSystemPathVc;
use turbopack::ecmascript::{ use turbopack::ecmascript::{
chunk::{ chunk::{
...@@ -14,18 +13,15 @@ use turbopack::ecmascript::{ ...@@ -14,18 +13,15 @@ use turbopack::ecmascript::{
use turbopack_core::{ use turbopack_core::{
asset::{Asset, AssetContentVc, AssetVc}, asset::{Asset, AssetContentVc, AssetVc},
chunk::{ chunk::{
Chunk, ChunkGroupVc, ChunkItem, ChunkItemVc, ChunkListReferenceVc, ChunkVc, ChunkableAsset, availability_info::AvailabilityInfo, Chunk, ChunkGroupReferenceVc, ChunkGroupVc, ChunkItem,
ChunkableAssetReference, ChunkableAssetReferenceVc, ChunkableAssetVc, ChunkingContext, ChunkItemVc, ChunkListReferenceVc, ChunkVc, ChunkableAsset, ChunkableAssetVc,
ChunkingContextVc, ChunkingType, ChunkingTypeOptionVc, ChunkingContextVc,
}, },
ident::AssetIdentVc, ident::AssetIdentVc,
reference::{AssetReference, AssetReferenceVc, AssetReferencesVc}, reference::AssetReferencesVc,
resolve::{ResolveResult, ResolveResultVc},
}; };
use turbopack_ecmascript::utils::stringify_js_pretty; use turbopack_ecmascript::utils::stringify_js_pretty;
use super::in_chunking_context_asset::InChunkingContextAsset;
#[turbo_tasks::function] #[turbo_tasks::function]
fn modifier() -> StringVc { fn modifier() -> StringVc {
StringVc::cell("chunks".to_string()) StringVc::cell("chunks".to_string())
...@@ -51,16 +47,30 @@ impl Asset for WithChunksAsset { ...@@ -51,16 +47,30 @@ impl Asset for WithChunksAsset {
} }
#[turbo_tasks::function] #[turbo_tasks::function]
fn references(&self) -> AssetReferencesVc { async fn references(self_vc: WithChunksAssetVc) -> Result<AssetReferencesVc> {
unimplemented!() let this = self_vc.await?;
let chunk_group = self_vc.chunk_group();
Ok(AssetReferencesVc::cell(vec![
ChunkGroupReferenceVc::new(chunk_group).into(),
ChunkListReferenceVc::new(this.server_root, chunk_group).into(),
]))
} }
} }
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl ChunkableAsset for WithChunksAsset { impl ChunkableAsset for WithChunksAsset {
#[turbo_tasks::function] #[turbo_tasks::function]
fn as_chunk(self_vc: WithChunksAssetVc, context: ChunkingContextVc) -> ChunkVc { fn as_chunk(
EcmascriptChunkVc::new(context, self_vc.as_ecmascript_chunk_placeable()).into() self_vc: WithChunksAssetVc,
context: ChunkingContextVc,
availability_info: Value<AvailabilityInfo>,
) -> ChunkVc {
EcmascriptChunkVc::new(
context,
self_vc.as_ecmascript_chunk_placeable(),
availability_info,
)
.into()
} }
} }
...@@ -71,10 +81,8 @@ impl EcmascriptChunkPlaceable for WithChunksAsset { ...@@ -71,10 +81,8 @@ impl EcmascriptChunkPlaceable for WithChunksAsset {
self_vc: WithChunksAssetVc, self_vc: WithChunksAssetVc,
context: ChunkingContextVc, context: ChunkingContextVc,
) -> Result<EcmascriptChunkItemVc> { ) -> Result<EcmascriptChunkItemVc> {
let this = self_vc.await?;
Ok(WithChunksChunkItem { Ok(WithChunksChunkItem {
context, context,
inner_context: this.chunking_context,
inner: self_vc, inner: self_vc,
} }
.cell() .cell()
...@@ -88,32 +96,27 @@ impl EcmascriptChunkPlaceable for WithChunksAsset { ...@@ -88,32 +96,27 @@ impl EcmascriptChunkPlaceable for WithChunksAsset {
} }
} }
#[turbo_tasks::value]
struct WithChunksChunkItem {
context: ChunkingContextVc,
inner_context: ChunkingContextVc,
inner: WithChunksAssetVc,
}
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl WithChunksChunkItemVc { impl WithChunksAssetVc {
#[turbo_tasks::function]
async fn chunk_list_path(self) -> Result<FileSystemPathVc> {
let this = self.await?;
Ok(this.inner_context.chunk_list_path(this.inner.ident()))
}
#[turbo_tasks::function] #[turbo_tasks::function]
async fn chunk_group(self) -> Result<ChunkGroupVc> { async fn chunk_group(self) -> Result<ChunkGroupVc> {
let this = self.await?; let this = self.await?;
let inner = this.inner.await?;
Ok(ChunkGroupVc::from_asset( Ok(ChunkGroupVc::from_asset(
inner.asset.into(), this.asset.into(),
this.inner_context, this.chunking_context,
Value::new(AvailabilityInfo::Root {
current_availability_root: this.asset.into(),
}),
)) ))
} }
} }
#[turbo_tasks::value]
struct WithChunksChunkItem {
context: ChunkingContextVc,
inner: WithChunksAssetVc,
}
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl EcmascriptChunkItem for WithChunksChunkItem { impl EcmascriptChunkItem for WithChunksChunkItem {
#[turbo_tasks::function] #[turbo_tasks::function]
...@@ -122,15 +125,14 @@ impl EcmascriptChunkItem for WithChunksChunkItem { ...@@ -122,15 +125,14 @@ impl EcmascriptChunkItem for WithChunksChunkItem {
} }
#[turbo_tasks::function] #[turbo_tasks::function]
async fn content(self_vc: WithChunksChunkItemVc) -> Result<EcmascriptChunkItemContentVc> { async fn content(&self) -> Result<EcmascriptChunkItemContentVc> {
let this = self_vc.await?; let inner = self.inner.await?;
let inner = this.inner.await?; let group = self.inner.chunk_group();
let group = self_vc.chunk_group();
let chunks = group.chunks().await?; let chunks = group.chunks().await?;
let server_root = inner.server_root.await?; let server_root = inner.server_root.await?;
let mut client_chunks = Vec::new(); let mut client_chunks = Vec::new();
let chunk_list_path = self_vc.chunk_list_path().await?; let chunk_list_path = group.chunk_list_path().await?;
let chunk_list_path = if let Some(path) = server_root.get_path_to(&chunk_list_path) { let chunk_list_path = if let Some(path) = server_root.get_path_to(&chunk_list_path) {
path path
} else { } else {
...@@ -139,10 +141,16 @@ impl EcmascriptChunkItem for WithChunksChunkItem { ...@@ -139,10 +141,16 @@ impl EcmascriptChunkItem for WithChunksChunkItem {
for chunk_path in chunks.iter().map(|c| c.path()).try_join().await? { for chunk_path in chunks.iter().map(|c| c.path()).try_join().await? {
if let Some(path) = server_root.get_path_to(&chunk_path) { if let Some(path) = server_root.get_path_to(&chunk_path) {
client_chunks.push(Value::String(path.to_string())); client_chunks.push(serde_json::Value::String(path.to_string()));
} }
} }
let module_id = stringify_js(&*inner.asset.as_chunk_item(this.inner_context).id().await?); let module_id = stringify_js(
&*inner
.asset
.as_chunk_item(inner.chunking_context)
.id()
.await?,
);
Ok(EcmascriptChunkItemContent { Ok(EcmascriptChunkItemContent {
inner_code: formatdoc! { inner_code: formatdoc! {
r#" r#"
...@@ -171,58 +179,7 @@ impl ChunkItem for WithChunksChunkItem { ...@@ -171,58 +179,7 @@ impl ChunkItem for WithChunksChunkItem {
} }
#[turbo_tasks::function] #[turbo_tasks::function]
async fn references(self_vc: WithChunksChunkItemVc) -> Result<AssetReferencesVc> { fn references(&self) -> AssetReferencesVc {
let this = self_vc.await?; self.inner.references()
let inner = this.inner.await?;
Ok(AssetReferencesVc::cell(vec![
WithChunksAssetReference {
asset: InChunkingContextAsset {
asset: inner.asset,
chunking_context: this.inner_context,
}
.cell()
.into(),
}
.cell()
.into(),
ChunkListReferenceVc::new(
inner.server_root,
self_vc.chunk_group(),
self_vc.chunk_list_path(),
)
.into(),
]))
}
}
#[turbo_tasks::value]
struct WithChunksAssetReference {
asset: AssetVc,
}
#[turbo_tasks::value_impl]
impl ValueToString for WithChunksAssetReference {
#[turbo_tasks::function]
async fn to_string(&self) -> Result<StringVc> {
Ok(StringVc::cell(format!(
"referenced asset {}",
self.asset.ident().to_string().await?
)))
}
}
#[turbo_tasks::value_impl]
impl AssetReference for WithChunksAssetReference {
#[turbo_tasks::function]
fn resolve_reference(&self) -> ResolveResultVc {
ResolveResult::asset(self.asset).cell()
}
}
#[turbo_tasks::value_impl]
impl ChunkableAssetReference for WithChunksAssetReference {
#[turbo_tasks::function]
fn chunking_type(&self) -> ChunkingTypeOptionVc {
ChunkingTypeOptionVc::cell(Some(ChunkingType::Separate))
} }
} }
use anyhow::Result; use anyhow::Result;
use turbo_tasks::primitives::StringVc; use turbo_tasks::{primitives::StringVc, Value};
use turbopack::ecmascript::chunk::{ use turbopack::ecmascript::chunk::{
EcmascriptChunkItemVc, EcmascriptChunkPlaceable, EcmascriptChunkPlaceableVc, EcmascriptChunkVc, EcmascriptChunkItemVc, EcmascriptChunkPlaceable, EcmascriptChunkPlaceableVc, EcmascriptChunkVc,
EcmascriptExportsVc, EcmascriptExportsVc,
}; };
use turbopack_core::{ use turbopack_core::{
asset::{Asset, AssetContentVc, AssetVc}, asset::{Asset, AssetContentVc, AssetVc},
chunk::{ChunkVc, ChunkableAsset, ChunkableAssetVc, ChunkingContext, ChunkingContextVc}, chunk::{
availability_info::AvailabilityInfo, ChunkVc, ChunkableAsset, ChunkableAssetVc,
ChunkingContext, ChunkingContextVc,
},
ident::AssetIdentVc, ident::AssetIdentVc,
reference::AssetReferencesVc, reference::AssetReferencesVc,
}; };
...@@ -43,8 +46,17 @@ impl Asset for WithChunkingContextScopeAsset { ...@@ -43,8 +46,17 @@ impl Asset for WithChunkingContextScopeAsset {
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl ChunkableAsset for WithChunkingContextScopeAsset { impl ChunkableAsset for WithChunkingContextScopeAsset {
#[turbo_tasks::function] #[turbo_tasks::function]
fn as_chunk(&self, context: ChunkingContextVc) -> ChunkVc { fn as_chunk(
EcmascriptChunkVc::new(context.with_layer(&self.layer), self.asset).into() &self,
context: ChunkingContextVc,
availability_info: Value<AvailabilityInfo>,
) -> ChunkVc {
EcmascriptChunkVc::new(
context.with_layer(&self.layer),
self.asset,
availability_info,
)
.into()
} }
} }
......
use anyhow::Result; use anyhow::Result;
use indoc::formatdoc; use indoc::formatdoc;
use turbo_tasks::{primitives::StringVc, ValueToString, ValueToStringVc}; use turbo_tasks::{primitives::StringVc, Value, ValueToString, ValueToStringVc};
use turbo_tasks_fs::FileSystemPathVc; use turbo_tasks_fs::FileSystemPathVc;
use turbopack::ecmascript::{ use turbopack::ecmascript::{
chunk::{ chunk::{
...@@ -13,9 +13,9 @@ use turbopack::ecmascript::{ ...@@ -13,9 +13,9 @@ use turbopack::ecmascript::{
use turbopack_core::{ use turbopack_core::{
asset::{Asset, AssetContentVc, AssetVc}, asset::{Asset, AssetContentVc, AssetVc},
chunk::{ chunk::{
Chunk, ChunkGroupVc, ChunkItem, ChunkItemVc, ChunkVc, ChunkableAsset, availability_info::AvailabilityInfo, Chunk, ChunkGroupVc, ChunkItem, ChunkItemVc, ChunkVc,
ChunkableAssetReference, ChunkableAssetReferenceVc, ChunkableAssetVc, ChunkingContext, ChunkableAsset, ChunkableAssetReference, ChunkableAssetReferenceVc, ChunkableAssetVc,
ChunkingContextVc, ChunkingType, ChunkingTypeOptionVc, ChunkingContext, ChunkingContextVc, ChunkingType, ChunkingTypeOptionVc,
}, },
ident::AssetIdentVc, ident::AssetIdentVc,
reference::{AssetReference, AssetReferenceVc, AssetReferencesVc}, reference::{AssetReference, AssetReferenceVc, AssetReferencesVc},
...@@ -23,8 +23,6 @@ use turbopack_core::{ ...@@ -23,8 +23,6 @@ use turbopack_core::{
}; };
use turbopack_ecmascript::utils::stringify_js_pretty; use turbopack_ecmascript::utils::stringify_js_pretty;
use crate::next_client_chunks::in_chunking_context_asset::InChunkingContextAsset;
#[turbo_tasks::function] #[turbo_tasks::function]
fn modifier() -> StringVc { fn modifier() -> StringVc {
StringVc::cell("client chunks".to_string()) StringVc::cell("client chunks".to_string())
...@@ -50,17 +48,26 @@ impl Asset for WithClientChunksAsset { ...@@ -50,17 +48,26 @@ impl Asset for WithClientChunksAsset {
#[turbo_tasks::function] #[turbo_tasks::function]
fn references(&self) -> AssetReferencesVc { fn references(&self) -> AssetReferencesVc {
unimplemented!() AssetReferencesVc::cell(vec![WithClientChunksAssetReference {
asset: self.asset.into(),
}
.cell()
.into()])
} }
} }
#[turbo_tasks::value_impl] #[turbo_tasks::value_impl]
impl ChunkableAsset for WithClientChunksAsset { impl ChunkableAsset for WithClientChunksAsset {
#[turbo_tasks::function] #[turbo_tasks::function]
fn as_chunk(self_vc: WithClientChunksAssetVc, context: ChunkingContextVc) -> ChunkVc { fn as_chunk(
self_vc: WithClientChunksAssetVc,
context: ChunkingContextVc,
availability_info: Value<AvailabilityInfo>,
) -> ChunkVc {
EcmascriptChunkVc::new( EcmascriptChunkVc::new(
context.with_layer("rsc"), context.with_layer("rsc"),
self_vc.as_ecmascript_chunk_placeable(), self_vc.as_ecmascript_chunk_placeable(),
availability_info,
) )
.into() .into()
} }
...@@ -104,7 +111,13 @@ impl EcmascriptChunkItem for WithClientChunksChunkItem { ...@@ -104,7 +111,13 @@ impl EcmascriptChunkItem for WithClientChunksChunkItem {
#[turbo_tasks::function] #[turbo_tasks::function]
async fn content(&self) -> Result<EcmascriptChunkItemContentVc> { async fn content(&self) -> Result<EcmascriptChunkItemContentVc> {
let inner = self.inner.await?; let inner = self.inner.await?;
let group = ChunkGroupVc::from_asset(inner.asset.into(), self.context); let group = ChunkGroupVc::from_asset(
inner.asset.into(),
self.context,
Value::new(AvailabilityInfo::Root {
current_availability_root: inner.asset.into(),
}),
);
let chunks = group.chunks().await?; let chunks = group.chunks().await?;
let server_root = inner.server_root.await?; let server_root = inner.server_root.await?;
...@@ -157,21 +170,8 @@ impl ChunkItem for WithClientChunksChunkItem { ...@@ -157,21 +170,8 @@ impl ChunkItem for WithClientChunksChunkItem {
} }
#[turbo_tasks::function] #[turbo_tasks::function]
async fn references(self_vc: WithClientChunksChunkItemVc) -> Result<AssetReferencesVc> { fn references(&self) -> AssetReferencesVc {
let this = self_vc.await?; self.inner.references()
let inner = this.inner.await?;
Ok(AssetReferencesVc::cell(vec![
WithClientChunksAssetReference {
asset: InChunkingContextAsset {
asset: inner.asset,
chunking_context: this.context,
}
.cell()
.into(),
}
.cell()
.into(),
]))
} }
} }
...@@ -203,6 +203,6 @@ impl AssetReference for WithClientChunksAssetReference { ...@@ -203,6 +203,6 @@ impl AssetReference for WithClientChunksAssetReference {
impl ChunkableAssetReference for WithClientChunksAssetReference { impl ChunkableAssetReference for WithClientChunksAssetReference {
#[turbo_tasks::function] #[turbo_tasks::function]
fn chunking_type(&self) -> ChunkingTypeOptionVc { fn chunking_type(&self) -> ChunkingTypeOptionVc {
ChunkingTypeOptionVc::cell(Some(ChunkingType::PlacedOrParallel)) ChunkingTypeOptionVc::cell(Some(ChunkingType::IsolatedParallel))
} }
} }
...@@ -4,7 +4,7 @@ use turbo_tasks_env::ProcessEnvVc; ...@@ -4,7 +4,7 @@ use turbo_tasks_env::ProcessEnvVc;
use turbo_tasks_fs::FileSystemPathVc; use turbo_tasks_fs::FileSystemPathVc;
use turbopack::ecmascript::EcmascriptModuleAssetVc; use turbopack::ecmascript::EcmascriptModuleAssetVc;
use turbopack_core::{ use turbopack_core::{
chunk::{ChunkGroupVc, ChunkableAsset, ChunkableAssetVc}, chunk::{availability_info::AvailabilityInfo, ChunkGroupVc, ChunkableAsset, ChunkableAssetVc},
reference_type::{EntryReferenceSubType, ReferenceType}, reference_type::{EntryReferenceSubType, ReferenceType},
resolve::{origin::PlainResolveOriginVc, parse::RequestVc}, resolve::{origin::PlainResolveOriginVc, parse::RequestVc},
}; };
...@@ -80,9 +80,12 @@ pub async fn create_web_entry_source( ...@@ -80,9 +80,12 @@ pub async fn create_web_entry_source(
} else if let Some(chunkable) = ChunkableAssetVc::resolve_from(module).await? { } else if let Some(chunkable) = ChunkableAssetVc::resolve_from(module).await? {
// TODO this is missing runtime code, so it's probably broken and we should also // TODO this is missing runtime code, so it's probably broken and we should also
// add an ecmascript chunk with the runtime code // add an ecmascript chunk with the runtime code
Ok(ChunkGroupVc::from_chunk( Ok(ChunkGroupVc::from_chunk(chunkable.as_chunk(
chunkable.as_chunk(chunking_context), chunking_context,
)) Value::new(AvailabilityInfo::Root {
current_availability_root: module,
}),
)))
} else { } else {
// TODO convert into a serve-able asset // TODO convert into a serve-able asset
Err(anyhow!( Err(anyhow!(
......
...@@ -3,7 +3,7 @@ PlainIssue { ...@@ -3,7 +3,7 @@ PlainIssue {
context: "[project]/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit", context: "[project]/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
category: "loaders", category: "loaders",
title: "Issue while running loader", title: "Issue while running loader",
description: "Error: Warning!\n at Object.module.exports (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/node_modules/emit-loader/index.js:2:20)\n at LOADER_EXECUTION (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4134)\n at runSyncOrAsync (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4145)\n at iterateNormalLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5426)\n at readResource (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts._.js:55:17)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:6160)\n at processResource (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4764)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4896)\n at handleResult (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:1424)\n at loadLoader (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:963)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4794)\n at runLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts._.js:35:9)\n at <anonymous>\n at Module.transform (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts._.js:28:12)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]__516bc8._.js:13:212)\n at Module.run (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_ipc_evaluate.ts._.js:172:45)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n", description: "Error: Warning!\n at Object.module.exports (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/node_modules/emit-loader/index.js:2:20)\n at LOADER_EXECUTION (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4134)\n at runSyncOrAsync (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4145)\n at iterateNormalLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5426)\n at readResource (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts_fa48d1._.js:55:17)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:6160)\n at processResource (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4764)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4896)\n at handleResult (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:1424)\n at loadLoader (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:963)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4794)\n at runLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts_fa48d1._.js:35:9)\n at <anonymous>\n at Module.transform (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts_fa48d1._.js:28:12)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]__c3ef78._.js:13:212)\n at Module.run (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_ipc_evaluate.ts_f5e151._.js:172:45)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n",
detail: "", detail: "",
documentation_link: "", documentation_link: "",
source: None, source: None,
......
...@@ -3,7 +3,7 @@ PlainIssue { ...@@ -3,7 +3,7 @@ PlainIssue {
context: "[project]/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit", context: "[project]/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
category: "loaders", category: "loaders",
title: "Issue while running loader", title: "Issue while running loader",
description: "Error: Error!\n at Object.module.exports (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/node_modules/emit-loader/index.js:4:18)\n at LOADER_EXECUTION (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4134)\n at runSyncOrAsync (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4145)\n at iterateNormalLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5426)\n at readResource (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts._.js:55:17)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:6160)\n at processResource (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4764)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4896)\n at handleResult (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:1424)\n at loadLoader (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:963)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4794)\n at runLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts._.js:35:9)\n at <anonymous>\n at Module.transform (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts._.js:28:12)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]__516bc8._.js:13:212)\n at Module.run (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_ipc_evaluate.ts._.js:172:45)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n", description: "Error: Error!\n at Object.module.exports (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/node_modules/emit-loader/index.js:4:18)\n at LOADER_EXECUTION (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4134)\n at runSyncOrAsync (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4145)\n at iterateNormalLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5426)\n at readResource (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts_fa48d1._.js:55:17)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:6160)\n at processResource (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5308)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4667)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4764)\n at <unknown> (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4896)\n at handleResult (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:1424)\n at loadLoader (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:963)\n at iteratePitchingLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4794)\n at runLoaders (node_modules/.pnpm/next@13.2.4-canary.7_pjwopsidmaokadturxaafygjp4/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8590)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts_fa48d1._.js:35:9)\n at <anonymous>\n at Module.transform (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_transforms_webpack-loaders.ts_fa48d1._.js:28:12)\n at <unknown> (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]__c3ef78._.js:13:212)\n at Module.run (crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/.next/build/webpack_loaders/chunks/[turbopack-node]_ipc_evaluate.ts_f5e151._.js:172:45)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n",
detail: "", detail: "",
documentation_link: "", documentation_link: "",
source: None, source: None,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment