diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-01-22 19:18:25 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-01-22 19:18:25 +0300 |
commit | cdaf8a3ef05840acc8b25da9971157f11619c85e (patch) | |
tree | 66c00f639215fac134a7c2532011ddd9372b3f07 | |
parent | 8e73cdf22d04790204bc9280cbe2fe3007c25b7e (diff) |
Use the production version of React when CDNv0.9.0
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | node_modules/mynodemod/index.js | 5 | ||||
-rw-r--r-- | node_modules/mynodemod/lib/index.js | 3 | ||||
-rw-r--r-- | package.json | 4 |
4 files changed, 4 insertions, 12 deletions
diff --git a/layouts/index.html b/layouts/index.html index 2d6357b..e70dd7f 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -7,8 +7,8 @@ </title> {{ if hugo.IsProduction }} {{/* We import from node_modules in development to get code completion etc. working. */}} - <script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script> - <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script> + <script src="https://unpkg.com/react@17/umd/react.production.min.js" crossorigin></script> + <script src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js" crossorigin></script> {{ end }} {{ $inject := slice "js/shims/process.js" }} {{ $js := resources.Get "js/main.js" | js.Build (dict "minify" false "params" (dict "myparam" "Hugo Rocks!") "inject" $inject ) }} diff --git a/node_modules/mynodemod/index.js b/node_modules/mynodemod/index.js deleted file mode 100644 index 4d28a19..0000000 --- a/node_modules/mynodemod/index.js +++ /dev/null @@ -1,5 +0,0 @@ -import { helloFromNodeModules } from './lib'; - -export function helloNodeModules() { - return `Hello from node_modules: ${helloFromNodeModules()}`; -} diff --git a/node_modules/mynodemod/lib/index.js b/node_modules/mynodemod/lib/index.js deleted file mode 100644 index f93a760..0000000 --- a/node_modules/mynodemod/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export function helloFromNodeModules() { - return 'Hello from lib in node_modules'; -} diff --git a/package.json b/package.json index 362b9fd..ff78c75 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "url": "git+https://github.com/gohugoio/hugoTestProjectJSModImports.git" }, "scripts": { - "test": "echo \"Error: no test specified\" \u0026\u0026 exit 1" + "test": "echo \"Error: no test specified\" && exit 1" }, "version": "1.0.0" -}
\ No newline at end of file +} |