1.3.0 • Published 6 years ago
aurgil-webpack-setup v1.3.0
aurgil-webpack-setup
This package allows you to get webpack config without to re-write it your-self.
This package contains three configurations for webpack
- Production : This configuration allows you to generate a build version of your webpack application
- Development : This configuration contains necessary tools to develop with webpack (source-map, server)
- Analysis : This configuration allows you to get a page to analyze your webpack application size (by chunk)
How to install
- Go to you project repository
cd my-projectnpm init -y
npm i -D aurgil-webpack-setupHow to use
- In your webpack config file (webpack.config.js), first of all, you have to get 'aurgil-webpack-setup'. Add the next line at the beginning of the file.
const WebpackSetup = require("aurgil-webpack-setup").WebpackSetup;- You have to require the webpack-merge package to make your life easier. Add the next line after the previous.
const webpackMerge = require("webpack-merge");- Now, you can write your webpack config and merge it with default configuration of 'aurgil-webpack-setup'.
let webpackSetup = new WebpackSetup(__dirname);
let myWebpackConfig = {entry: "./src/index.js"};
let devWebpackConfig = webpackMerge(myWebpackConfig, webpackSetup.development.config());
let prodWebpackConfig = webpackMerge(myWebpackConfig, webpackSetup.production.config() );
let anlWebpackConfig = webpackMerge(myWebpackConfig, webpackSetup.analysis.config() );
module.exports = devWebpackConfig ;
//module.exports = prodWebpackConfig;
//module.exports = anlWebpackConfig ;- Finaly, you can start webpack with the configuration
webpack --config webpack.config.jsDefault configuration
- Production configuration :
~=productionConfig=~- Development configuration :
~=developmentConfig=~- Analysis configuration :
~=analysisConfig=~1.3.0
6 years ago
1.2.0
6 years ago
1.2.1
6 years ago
1.1.9
6 years ago
1.1.12
6 years ago
1.1.11
6 years ago
1.1.10
6 years ago
1.1.14
6 years ago
1.1.13
6 years ago
1.1.8
6 years ago
1.1.7
6 years ago
1.1.6
6 years ago
1.1.5
6 years ago
1.1.4
6 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago