mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 05:24:49 -04:00
Revert "js: Update shims setup"
This reverts commit 704987dc1c4d758da2b8f0a704f771d21aa2ac08.
This commit is contained in:
parent
77def8a8c3
commit
399c74acd6
@ -152,11 +152,10 @@ It's a common practice to load external libraries using a content delivery netwo
|
|||||||
First, add React and ReactDOM [CDN script tags](https://reactjs.org/docs/add-react-to-a-website.html#tip-minify-javascript-for-production) in your HTML template files. Then create `assets/js/shims/react.js` and `assets/js/shims/react-dom.js` with the following contents:
|
First, add React and ReactDOM [CDN script tags](https://reactjs.org/docs/add-react-to-a-website.html#tip-minify-javascript-for-production) in your HTML template files. Then create `assets/js/shims/react.js` and `assets/js/shims/react-dom.js` with the following contents:
|
||||||
```js
|
```js
|
||||||
// In assets/js/shims/react.js
|
// In assets/js/shims/react.js
|
||||||
export let React = window.React;
|
module.exports = window.React;
|
||||||
|
|
||||||
// In assets/js/shims/react-dom.js
|
// In assets/js/shims/react-dom.js
|
||||||
export let ReactDom = window.ReactDom;
|
module.exports = window.ReactDOM;
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, add the following to your project's `package.json`:
|
Finally, add the following to your project's `package.json`:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user