Skip to content

Commit

Permalink
fix: broken webpack mangling of harmony imports in production mode (#223
Browse files Browse the repository at this point in the history
)
  • Loading branch information
vilnytskyi authored Jul 7, 2023
1 parent 663b24d commit 492e434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IncludeDependency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class IncludeDependency extends webpack.dependencies.ModuleDependency {
getReferencedExports(moduleGraph: webpack.ModuleGraph): (string[] | ReferencedExport)[] {
// when there's no specific exports are targetted,
// passing an empty array means preserving all
return [{ name: this.options?.exports ?? [], canMangle: false }]
return require("webpack").Dependency.EXPORTS_OBJECT_REFERENCED
}

get [preserveModuleName]() {
Expand Down

0 comments on commit 492e434

Please sign in to comment.