Webpack Set up

var webpack = require(‘webpack’); var path = require(‘path’); var BUILD_DIR = path.resolve(__dirname, ‘src/client/public’); var APP_DIR = path.resolve(__dirname, ‘src/client/app’); var config = { entry: APP_DIR + ‘/index.jsx’, output: { path: BUILD_DIR, filename: ‘bundle.js’ } }; module.exports = config;

The APP_DIR holds the directory path of the React application's codebase and the BUILD_DIR represents the directory path of the bundle file output.

https://www.codementor.io/tamizhvendan/beginner-guide-setup-reactjs-environment-npm-babel-6-webpack-du107r9zr

Show your support

Clapping shows how much you appreciated Jiao Wang’s story.