baltpeter/generator-ts

Implement a web app target

Opened this issue · 2 comments

Similar to #1, we should also support web apps as targets.

Necessary changes in package.json:

  • "private": true
  • "source": "src/index.html"
  • Get rid of main, types, files
  • scripts.watch: "parcel"
  • "browserslist": "> 0.5%, last 2 versions, not dead"

Necessary changes in tsconfig.json:

  • "extends": "@baltpeter/tsconfig/tsconfig.preact.json"

For Preact, add this to package.json:

"alias": {
      "react": "preact/compat",
      "react-dom/test-utils": "preact/test-utils",
      "react-dom": "preact/compat",
      "react/jsx-runtime": "preact/jsx-runtime"
  }