Skip to content

Commit

Permalink
fix($readme): graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
faceyspacey committed Jul 27, 2017
1 parent 7648559 commit 336080c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# babel-plugin-universal-import [![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square)](https://gitter.im/faceyspacey/Lobby)
<a href="https://gitter.im/Reactlandia/Lobby" target="_blank">
<img alt="Edit Redux-First Router Demo" src="http://cdn.reactlandia.com/chat-badge-reactlandia.png">
</a>

# babel-plugin-universal-import

<p align="center">
<a href="https://www.npmjs.com/package/babel-plugin-universal-import">
Expand Down Expand Up @@ -31,14 +35,17 @@
</p>


<p align="center">
<img src="./universal-graphic.png" />
</p>

## Installation
```
yarn add babel-plugin-universal-import
```
*.babelrc:*
```js
{
"presets": [whatever you usually have],
"plugins": ["universal-import"]
}
```
Expand Down Expand Up @@ -67,7 +74,7 @@ const UniversalComponent = universal(universalImport({
load: () => Promise.all([
import( /* webpackChunkName: 'Foo' */ './Foo.js'),
importCss('Foo')
])
]).then(proms => proms[0])
}))

<UniversalComponent />
Expand Down Expand Up @@ -95,7 +102,7 @@ const UniversalComponent = universal(props => universalImport({
load: props => Promise.all([
import( /* webpackChunkName: '[request]' */ `./${props.page}`),
importCss(page)
])
]).then(proms => proms[0])
}));

<UniversalComponent page='Foo' />
Expand Down
Binary file added universal-graphic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 336080c

Please sign in to comment.