From 399c74acd69aa7d17e72c03942a84a66d4857f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Thu, 21 Jan 2021 19:07:38 +0100 Subject: [PATCH] Revert "js: Update shims setup" This reverts commit 704987dc1c4d758da2b8f0a704f771d21aa2ac08. --- content/en/hugo-pipes/js.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/content/en/hugo-pipes/js.md b/content/en/hugo-pipes/js.md index a549b09c1..a34454a93 100644 --- a/content/en/hugo-pipes/js.md +++ b/content/en/hugo-pipes/js.md @@ -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: ```js // In assets/js/shims/react.js -export let React = window.React; +module.exports = window.React; // 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`: