terrierscript
7/11/2018 - 6:02 AM

create-react-appでの素振り時にparcelに切り替えてしてTypeScript化する ref: https://qiita.com/terrierscript/items/dc0e7eb254ae38406404

create-react-appでの素振り時にparcelに切り替えてしてTypeScript化する ref: https://qiita.com/terrierscript/items/dc0e7eb254ae38406404

# parcel
/.cache
/dist
# parcel
/.cache
/dist
  <!-- ↓追加-->
  <script src="../src/index.js"></script>
</body>
<!-- 
  <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
  <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
-->

<link rel="manifest" href="./manifest.json">
<link rel="shortcut icon" href="./favicon.ico">

  "scripts": {
    "start": "parcel serve public/index.html",
    "build": "parcel build public/index.html",
   }
<!-- 
  <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
  <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
-->

<link rel="manifest" href="./manifest.json">
<link rel="shortcut icon" href="./favicon.ico">

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
$ yarn add @types/react
$ yarn start --no-cache
// @ts-ignore
import logo from "./logo.svg";
$ mv src/App.js src/App.tsx
$ yarn add parcel-bundler parcel-plugin-typescript typescript
$ npx create-react-app example-app