Giter VIP home page Giter VIP logo

react-seed-webpack-babel's Introduction

(This is a sample seed project for creating react projects - uses webpack and babel)

Step by step

  • create the project folder

  • npm init

  • npm install webpack webpack-cli

  • npm install @babel/core babel-loader @babel/preset-env @babel/preset-react

  • create a minimal .babelrc file to add presets

  • create a minimal webpack config file to configure babel-loader module

  • npm install react and react-dom

  • create a sample component as component/Form.js

  • create src/index.js - which is the entry point for webpack

  • now run "npm run build" to create "dist/main.js"

  • add these two more bundles for handling html with webpack: html-webpack-plugin and html-loader

  • and add the module definition for html-loader and plugins for html-webpack-plugin in webpack configuration

  • add a template html file at src/index.html

  • run the build again - npm run build

  • npm install webpack-dev-server --save-dev

  • you are now ready to start the application: npm start

  • references: https://www.valentinog.com/blog/babel/

react-seed-webpack-babel's People

Contributors

vishalakhouri avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.