This webpack is designed for single page applications aka SPA. You can use it for building react & angular1 applications and also for building any website. It includes all the process for bundling & minimizing all your JS/ES6 and CSS code including sourcemap. Bundling is more faster and easy to manage entire application architecture and folder structure.
- ES6 syntax
- Angular 1 and React
- CSS
- Scss
- Stylus
- Autoprefix
- Auto Reload
- Remove
console.log
for production build
Just define some object literals in config/config.js
port:
Assign port for your projectbasePath:
Its a path which will have entire project files and foldersentryFile:
Define name of file which will import entire project files usingimport
orrequire
outputJS:
This will be js file which will have all minimized javascript code of project. This file will be generated automaticallyoutputCSS:
CSS file which will have minimized CSS code of project. This file will be generated automatically
port: 1500,
basePath: "public",
entryFile: "./index",
outputJS: "index.min.js",
outputCSS: "index.css"
npm install
npm install webpack-dev-server -g
npm start
npm run prod
- Install all react dependencies
- Edit
.babelrc
file
{
"presets": ['es2015', 'react']
}
import
orrequire
everything in your entry file by default entry file isindex.js
- Ready to rock!
- Install all angular dependencies
import
orrequire
everything in your entry file by default entry file isindex.js
- Ready to rock!
Next release going to have typescript
, elm
and other suggested features.