Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure it's a real module when choosing for ModuleConcatenation
fixes #5095
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import value from "dll/module"; | ||
|
||
it("should not scope hoist delegated modules", function() { | ||
value.should.be.eql("ok"); | ||
}); |
19 changes: 19 additions & 0 deletions
19
test/configCases/scope-hoisting/dll-plugin/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var webpack = require("../../../../"); | ||
module.exports = { | ||
plugins: [ | ||
new webpack.DllReferencePlugin({ | ||
name: "function(id) { return {default: 'ok'}; }", | ||
scope: "dll", | ||
content: { | ||
"./module": { | ||
id: 1, | ||
meta: { | ||
harmonyModule: true | ||
}, | ||
exports: ["default"] | ||
} | ||
} | ||
}), | ||
new webpack.optimize.ModuleConcatenationPlugin() | ||
] | ||
}; |