mirror of https://github.com/webpack/webpack.git
add test case
This commit is contained in:
parent
e29e3cdc0d
commit
ce71f9b6ab
|
|
@ -0,0 +1,7 @@
|
|||
it("should allow to work without shared modules", async () => {
|
||||
await __webpack_init_sharing__("default");
|
||||
const container = __non_webpack_require__("./container.js");
|
||||
container.init(__webpack_share_scopes__.default);
|
||||
const moduleFactory = await container.get("./module");
|
||||
expect(moduleFactory().ok).toBe(true);
|
||||
});
|
||||
|
|
@ -0,0 +1 @@
|
|||
export const ok = true;
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
const { ModuleFederationPlugin } = require("../../../../").container;
|
||||
|
||||
/** @type {import("../../../../").Configuration} */
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new ModuleFederationPlugin({
|
||||
name: "container",
|
||||
filename: "container.js",
|
||||
library: { type: "commonjs-module" },
|
||||
exposes: ["./module"]
|
||||
})
|
||||
]
|
||||
};
|
||||
Loading…
Reference in New Issue