how to create saza app :
npm i -g saza
saza my-app-name
for start typescript app:
npm i -g saza
saza my-app-name --typescript
or npx
npx my-app-name --typescript
for start live server for developing app :
npm run start
build production from saza app :
npm run build
- import source of
svg
file and use<img src={svgSource}
like below :
import svgSource from "./icon.svg";
function App() {
return (<>
<img src={svgSource} />
</>);
}
export default App;
- import
svg
as aReactComponent
:
import {ReactComponent as Icon} from "./icon.svg";
function App() {
return (<>
<Icon />
</>);
}
export default App;
react not found problem :
https://stackoverflow.com/a/64994595/10835176
jsx loader for webpack :
https://stackoverflow.com/questions/68422492/how-to-use-js-jsx-files-in-a-typescriptwebpack-project
open browser automaticly by serve :
https://stackoverflow.com/a/39753225/10835176
auto React import in typescript :
GET / : * problem :
https://stackoverflow.com/questions/71602863/webpack-dev-server-cannot-get