@enact/template-moonstone
Advanced tools
Comparing version
{ | ||
"name": "@enact/template-moonstone", | ||
"version": "4.0.1", | ||
"version": "4.5.0", | ||
"description": "A template generator for Enact Moonstone applications.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -33,12 +33,13 @@ { | ||
"dependencies": { | ||
"@enact/core": "^4.0.0", | ||
"@enact/i18n": "^4.0.0", | ||
"@enact/moonstone": "^4.0.0", | ||
"@enact/spotlight": "^4.0.0", | ||
"@enact/ui": "^4.0.0", | ||
"ilib": "^14.6.0", | ||
"prop-types": "^15.6.2", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1" | ||
"@enact/core": "^4.5.0", | ||
"@enact/i18n": "^4.5.0", | ||
"@enact/moonstone": "^4.5.0", | ||
"@enact/spotlight": "^4.5.0", | ||
"@enact/ui": "^4.5.0", | ||
"ilib": "^14.14.0", | ||
"prop-types": "^15.8.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"web-vitals": "^2.1.4" | ||
} | ||
} |
@@ -26,2 +26,3 @@ This project was bootstrapped with [@enact/cli](https://github.com/enactjs/cli). | ||
index.js | ||
reportWebVitals.js | ||
resources/ | ||
@@ -83,2 +84,3 @@ ``` | ||
* `nodeBuiltins` _[object]_ - Configuration settings for polyfilling NodeJS built-ins. See `node` [webpack option](https://webpack.js.org/configuration/node/). | ||
* `resolveFallback` _[object]_ - Configuration settings for redirecting module requests when normal resolving fails. See `resolve.fallback` [webpack option](https://webpack.js.org/configuration/resolve/#resolvefallback). | ||
* `deep` _[string|array]_ - 1 or more JavaScript conditions that, when met, indicate deeplinking and any prerender should be discarded. | ||
@@ -94,6 +96,6 @@ * `target` _[string|array]_ - A build-type generic preset string (see `target` [webpack option](https://webpack.js.org/configuration/target/)) or alternatively a specific [browserslist array](https://github.com/browserslist/browserslist) of desired targets. | ||
"theme": "moonstone", | ||
"nodeBuiltins": { | ||
fs: 'empty', | ||
net: 'empty', | ||
tls: 'empty' | ||
"resolveFallback": { | ||
fs: false, | ||
net: false, | ||
tls: false | ||
} | ||
@@ -125,3 +127,3 @@ } | ||
```sh | ||
npm remove -g eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-babel babel-eslint eslint-plugin-jest eslint-plugin-enact eslint-config-enact | ||
npm remove -g eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-babel @babel/eslint-parser eslint-plugin-jest eslint-plugin-enact eslint-config-enact | ||
``` | ||
@@ -131,3 +133,3 @@ | ||
The generated project includes Enact (and all its libraries). It also includes React and ReactDOM. For test writing, both Sinon and Enzyme are as development dependencies. You may install other dependencies with `npm`: | ||
The generated project includes Enact (and all its libraries). It also includes React and ReactDOM. For test writing, both Jest and @testing-library/react are as development dependencies. You may install other dependencies with `npm`: | ||
@@ -134,0 +136,0 @@ ```sh |
@@ -1,3 +0,6 @@ | ||
import {render} from 'react-dom'; | ||
/* global ENACT_PACK_ISOMORPHIC */ | ||
import {createRoot, hydrateRoot} from 'react-dom/client'; | ||
import App from './App'; | ||
import reportWebVitals from './reportWebVitals'; | ||
@@ -8,5 +11,15 @@ const appElement = (<App />); | ||
if (typeof window !== 'undefined') { | ||
render(appElement, document.getElementById('root')); | ||
if (ENACT_PACK_ISOMORPHIC) { | ||
hydrateRoot(document.getElementById('root'), appElement); | ||
} else { | ||
createRoot(document.getElementById('root')).render(appElement); | ||
} | ||
} | ||
export default appElement; | ||
// If you want to start measuring performance in your app, pass a function | ||
// to log results (for example: reportWebVitals(console.log)) | ||
// or send to an analytics endpoint. | ||
// Learn more: https://github.com/enactjs/cli/blob/master/docs/measuring-performance.md | ||
reportWebVitals(); |
28803
4.13%16
6.67%78
41.82%