Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# unreleased

* Fixed `EnactFrameworkRefPlugin` to detect imports that come from ignored packages and bundle them directly into the view instead of trying to externalize them.

# 7.0.3 (January 13, 2026)

* Updated dependencies.
Expand Down
14 changes: 13 additions & 1 deletion plugins/dll/EnactFrameworkRefPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ class DelegatedEnactFactoryPlugin {
return callback(null, new DelegatedModule(name, {id: polyID}, 'require', polyID, polyID));
} else if (local && request && context && request.startsWith('.')) {
let resource = path.join(context, request);

// Check if the resource path contains any ignored package path
// This prevents externalizing internal imports from ignored packages
if (ignReg) {
const pathSegments = resource.split(/[\\/]node_modules[\\/]/);
for (const segment of pathSegments) {
if (ignReg.test(segment)) {
return callback(); // Don't externalize - bundle it instead
}
}
}

if (
resource.startsWith(app.context) &&
!/[\\/]tests[\\/]/.test('./' + path.relative(app.context, resource)) &&
Expand All @@ -52,7 +64,7 @@ class DelegatedEnactFactoryPlugin {
.replace(app.context, app.name)
.replace(/\.js$/, '')
.replace(/\\/g, '/')
.replace(app.name + '/node_modules/', '')
.replace(/.*[\\/]node_modules[\\/]/, '')
.replace(/[\\/]$/, '');
return callback(null, new DelegatedModule(name, {id: localID}, 'require', localID, localID));
}
Expand Down