-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
it('should provide own dependency', async () => { | ||
expect(await import('lib')).toEqual( | ||
expect.objectContaining({ | ||
default: '[email protected] with [email protected]', | ||
}), | ||
); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "commonjs" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"lib": "^1.0.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { SharePlugin } = require("@rspack/core").sharing; | ||
|
||
/** @type {import("../../../../").Configuration} */ | ||
module.exports = { | ||
context: `${__dirname}/cjs`, | ||
plugins: [ | ||
new SharePlugin({ | ||
shared: { | ||
lib: {}, | ||
transitive_lib: {}, | ||
}, | ||
}), | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
it('should provide library from own package.json', async () => { | ||
expect(await import('lib1')).toEqual( | ||
expect.objectContaining({ | ||
default: '[email protected]', | ||
}), | ||
); | ||
}); | ||
|
||
it('should provide library from parent package.json', async () => { | ||
expect(await import('lib2')).toEqual( | ||
expect.objectContaining({ | ||
default: '[email protected]', | ||
}), | ||
); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": { | ||
"lib2": "^2.0.0" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"dependencies": { | ||
"lib1": "^1.0.0", | ||
"lib2": "^1.0.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const { SharePlugin } = require("@rspack/core").sharing; | ||
|
||
/** @type {import("../../../../").Configuration} */ | ||
module.exports = { | ||
context: `${__dirname}/app1`, | ||
plugins: [ | ||
new SharePlugin({ | ||
shared: { | ||
lib1: {}, | ||
lib2: { | ||
singleton: true, | ||
}, | ||
}, | ||
}), | ||
], | ||
}; |