ko-webpack-react

1.1.3 • Public • Published

ko-webpack-react

webpack setting package for react compile

Usage

import settings for your production build and dev environment set in your webpack.config.js

Quick start

const {config} = require('ko-webpack-vanilla');

const options = {
  entry: {
    app: '/src/index.js',
    new: '/src/index.js'
  },

  output: {
    path: ('/assets/js'),
    publicPath: '/assets/js/',
    filename: '[name].js',
  }
};

module.exports = config(options);

with sample package json scripts

{
  "scripts": {
    "dev-env": "NODE_ENV=dev yarn webpack-dev-server",
    "start": "yarn dev-env",
    "build": "NODE_ENV=prod yarn webpack --mode production"
  }
}

Import base options

const {prod} = require('ko-webpack-vanilla');

const options = {
  entry: {
    app: '/src/index.js',
    new: '/src/index.js'
  },

  output: {
    path: ('/assets/js'),
    publicPath: '/assets/js/',
    filename: '[name].js',
  }
};

module.exports = prod(options); // yarn webpack

or

const {dev} = require('ko-webpack-vanilla');

const options = {
  entry: {
    app: '/src/index.js',
    new: '/src/index.js'
  },

  output: {
    path: ('/assets/js'),
    publicPath: '/assets/js/',
    filename: '[name].js',
  }
};

module.exports = dev(options); // yarn webpack-dev-server

Readme

Keywords

Package Sidebar

Install

npm i ko-webpack-react

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

5.09 kB

Total Files

7

Last publish

Collaborators

  • seeliang