-
-
Notifications
You must be signed in to change notification settings - Fork 786
fix(mf): resolve version from parent package for secondary entry points #13636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
9c14987
942165a
2af84d9
d9eb58a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| it("should provide a secondary entry point using the parent package version", async () => { | ||
| const styles = await import("@scope/pkg/styles"); | ||
| expect(styles).toEqual( | ||
| expect.objectContaining({ | ||
| default: "pkg-styles" | ||
| }) | ||
| ); | ||
|
|
||
| await __webpack_init_sharing__("default"); | ||
| expect(Object.keys(__webpack_share_scopes__.default)).toContain("@scope/pkg/styles"); | ||
| expect(Object.keys(__webpack_share_scopes__.default["@scope/pkg/styles"])).toContain("1.2.3"); | ||
| }); | ||
|
|
||
| it("should provide the root package normally", async () => { | ||
| const pkg = await import("@scope/pkg"); | ||
| expect(pkg).toEqual( | ||
| expect.objectContaining({ | ||
| default: "pkg-root" | ||
| }) | ||
| ); | ||
| }); | ||
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": { | ||
| "@scope/pkg": "^1.0.0" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| // eslint-disable-next-line node/no-unpublished-require | ||
| const { SharePlugin } = require('@rspack/core').sharing; | ||
|
|
||
| /** @type {import("@rspack/core").Configuration} */ | ||
| module.exports = { | ||
| mode: 'development', | ||
| devtool: false, | ||
| plugins: [ | ||
| new SharePlugin({ | ||
| shared: { | ||
| '@scope/pkg': {}, | ||
| '@scope/pkg/styles': {}, | ||
| }, | ||
| }), | ||
| ], | ||
| }; |
Uh oh!
There was an error while loading. Please reload this page.