Skip to content

This repo holds Webpack skeleton, which has few important functionalities that is needed for a web application. Just add your file paths and start coding!

License

Notifications You must be signed in to change notification settings

patlolla-sai-charan-reddy/WebpackSkeleton

Repository files navigation

Webpack Skeleton

This repo holds Webpack skeleton, which has pretty much every functionality that is needed for a web application. Just add your file paths and start coding!

Steps to Reproduce the repo:

sudo is to run as admin, windows user can ignore that part

Step 1

sudo npm i webpack webpack-dev-server --save-dev -g

sudo npm i babel babel-core babel-loader babel-preset-es2015 --save-dev

sudo npm i react react-dom --save-dev

sudo npm install babel-core babel-loader jshint jshint-loader eslint-loader node-libs-browser babel-preset-es2015 babel-preset-react babel-preset-react-env --save-dev

sudo npm install babel-loader eslint-loader uglifyjs-webpack-plugin extract-text-webpack-plugin css-loader node-sass sass-loader resolve-url-loader copy-webpack-plugin jquery glob-all --save-dev

Step 2

Create webpack.config.js file

Step 3

Declare the plugins needed in config file

Here is the Snippet to add in webpack.config.js file

var webpack = require('webpack');

var path = require('path');

var UglifyJSPlugin = require('uglifyjs-webpack-plugin');

var ExtractTextPlugin = require('extract-text-webpack-plugin');

var ConcatPlugin = require('webpack-concat-plugin');

var glob = require("glob-all");

var CopyWebpackPlugin = require('copy-webpack-plugin');

Step 4

To simplify the webpack, I have written module.exports as array and create multiple objects inside it.

module.exports = [

//SCSS to CSS
{
},

//ES6 to ES5
{
},

//Minify the Files
{
},

//JSHINT
{
},

//Copy
{
}

]

Step 5

Enter "webpack" in terminal to build the modules
Enter "webpack-dev-server" to run the server, basically to leverage the livereload

You can see the output at localhost:8080

CircleCI

About

This repo holds Webpack skeleton, which has few important functionalities that is needed for a web application. Just add your file paths and start coding!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published