wbc

webpack-base-config

the webpack base config of react develop environment

Showing:

Popularity

Downloads/wk

14

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

18

Size (min+gzip)

868.4KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

webpack-base-config

the webpack base config of react develop environment
使用webpack、webpack-dev-server快速搭建react开发环境

中文文档

Install

npm install webpack-base-config --save-dev

Usage

in root directory of your project create new js file(e.g: server.js) and write following code:

const { webpackConfig, webpackDevServer } = require('webpack-base-config');

webpackDevServer(webpackConfig(Options));

In order to ensure the Babel compilation, you need to create .babelrc file in your root directory

{
  "presets": ["es2015", "stage-0", "react"],
  "plugins": ["transform-runtime"],
}

Options

the options is a object, and the value like this:

const Options = {
  entry: './src/index.js',  // your project entry file
  htmlTemplate: './src/index_template.html', // your html template file
};

so, use node server.js to start the local server in localhost: 3000

Demo

see the usage demo

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100