Skip to content

Commit

Permalink
Use the production version of React when CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jan 22, 2021
1 parent 8e73cdf commit cdaf8a3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) }}
Expand Down
5 changes: 0 additions & 5 deletions node_modules/mynodemod/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions node_modules/mynodemod/lib/index.js

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit cdaf8a3

Please sign in to comment.