Skip to content

Electron, React ,TailwindCSS, react-router-dom, Typescript, Webpack ( built with electron forge template

Notifications You must be signed in to change notification settings

LanguageXange/electron-react-ts-tailwind

Repository files navigation

Electron Forge https://www.electronforge.io/guides/framework-integration/react-with-typescript

yarn create electron-app woohoo --template=webpack-typescript

yarn ( make sure to create .yarnrc.yml and add nodeLinker: node-modules if you don't see node_modules )

yarn add react react-dom

yarn add -D @types/react @types/react-dom

make sure to update tsconfig.json "jsx": "react-jsx”

webpack.main.config.ts update the entry to ./src/main.ts

https://tailwindcss.com/docs/installation/using-postcss

yarn add -D tailwindcss postcss autoprefixer postcss-loader

yarn tailwindcss init

yarn start

Add this in webpack.rules.ts

 {
    test: /\.css$/,
    use: [
      { loader: "style-loader" },
      { loader: "css-loader" },
      {
        loader: "postcss-loader",
        options: {
          postcssOptions: {
            plugins: [require("tailwindcss"), require("autoprefixer")],
          },
        },
      },
    ],
  },

About

Electron, React ,TailwindCSS, react-router-dom, Typescript, Webpack ( built with electron forge template

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published