Skip to content

Commit 187907a

Browse files
committed
Correction to samples
1 parent 9a6b7b7 commit 187907a

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,11 @@ assignment syntax, so if you need to support browsers without that capability, y
2727

2828
## Sample
2929

30-
```js
31-
// Original
32-
import { createElement } from 'react';
33-
import { makeStyles, createStyles, Typography } from '@material-ui/core';
34-
import { useIntl } from 'react-intl';
35-
import jss from 'jss';
36-
37-
// ...
38-
```
39-
4030
```js
4131
// rollup.config.js
4232

4333
const globals = {
34+
'jss': 'window.libs.jss',
4435
'react': 'window.libs.React',
4536
'react-dom': 'window.libs.ReactDOM',
4637
'@material-ui/core': 'window.libs.MaterialUI'
@@ -58,7 +49,17 @@ export default {
5849
```
5950

6051
```js
61-
// transformed
52+
// Original code
53+
import { createElement } from 'react';
54+
import { makeStyles, createStyles, Typography } from '@material-ui/core';
55+
import { useIntl } from 'react-intl';
56+
import jss from 'jss';
57+
58+
// ...
59+
```
60+
61+
```js
62+
// Transformed output
6263
var { createElement } = window.libs.React;
6364
var { makeStyles, createStyles, Typography } = window.libs.MaterialUI;
6465
var { useIntl } = window.libs.ReactIntl;

0 commit comments

Comments
 (0)