-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update typescript example to stream typescript (#2240)
* update typescript example to strteam typescript * update readme and contributors
- Loading branch information
1 parent
c4b3406
commit 5142c51
Showing
9 changed files
with
35 additions
and
6 deletions.
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 |
---|---|---|
|
@@ -4,6 +4,9 @@ | |
"description": "Examples showcasing Webpack 5's Module Federation", | ||
"repository": "https://github.com/module-federation/module-federation-examples.git", | ||
"author": "Zack Jackson <[email protected]> (https://github.com/ScriptedAlchemy)", | ||
"contributors": [ | ||
"Prasanna Mestha <[email protected]> (https://github.com/prasannamestha)" | ||
], | ||
"license": "MIT", | ||
"private": true, | ||
"workspaces": { | ||
|
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 |
---|---|---|
@@ -1,11 +1,19 @@ | ||
# TypeScript Example | ||
|
||
This example demos a basic host/remote application with TypeScript. | ||
This example demos a basic host/remote application with TypeScript and also streams types. | ||
|
||
# Installation | ||
You can grab a free license for this plugin via privjs.com: [https://app.privjs.com/buy/packageDetail?pkg=@module-federation/typescript](https://app.privjs.com/buy/packageDetail?pkg=@module-federation/typescript). Then run the following commands: | ||
```bash | ||
$ npm config set @module-federation:registry https://r.privjs.com | ||
$ npm i @module-federation/typescript | ||
``` | ||
|
||
# Running Demo | ||
|
||
Run `yarn start`. This will build and serve both `app1` and `app2` on ports 3001 and 3002 respectively. | ||
|
||
- [localhost:3001](http://localhost:3001/) | ||
- [localhost:3002](http://localhost:3002/) | ||
<img src="https://ssl.google-analytics.com/collect?v=1&t=event&ec=email&ea=open&t=event&tid=UA-120967034-1&z=1589682154&cid=ae045149-9d17-0367-bbb0-11c41d92b411&dt=ModuleFederationExamples&dp=/email/TypeScript"> | ||
|
||
<img src="https://ssl.google-analytics.com/collect?v=1&t=event&ec=email&ea=open&t=event&tid=UA-120967034-1&z=1589682154&cid=ae045149-9d17-0367-bbb0-11c41d92b411&dt=ModuleFederationExamples&dp=/email/TypeScript"> |
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
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
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 |
---|---|---|
@@ -1,5 +1,13 @@ | ||
import * as React from 'react'; | ||
|
||
const Button = () => <button>App 2 Button</button>; | ||
type ButtonProps = { | ||
size: 'small' | 'large' | ||
} | ||
const Button: React.FC<ButtonProps> = ({ size }) => { | ||
if (size === 'large') { | ||
return <button>App2 Large Button</button> | ||
} | ||
return <button>App 2 Small Button</button> | ||
}; | ||
|
||
export default Button; |
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
5142c51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-example-utils – ./medusa-example/utils
medusa-example-utils.vercel.app
medusa-example-utils-module-federation.vercel.app
medusa-example-utils-git-master-module-federation.vercel.app
5142c51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-example-home – ./medusa-example/home
medusa-example-home-module-federation.vercel.app
medusa-example-home.vercel.app
medusa-example-home-git-master-module-federation.vercel.app
5142c51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-example-search – ./medusa-example/search
medusa-example-search-module-federation.vercel.app
medusa-example-search-git-master-module-federation.vercel.app
medusa-example-search.vercel.app
5142c51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-example-nav – ./medusa-example/nav
medusa-example-nav-module-federation.vercel.app
medusa-example-nav.vercel.app
medusa-example-nav-git-master-module-federation.vercel.app
5142c51
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
medusa-example-dsl – ./medusa-example/dsl
medusa-example-dsl.vercel.app
medusa-example-dsl-git-master-module-federation.vercel.app
medusa-example-dsl-module-federation.vercel.app