Skip to content
Browse files
add webpack.config.js
  • Loading branch information
nicoqh committed Jun 3, 2019
1 parent 5adaddd commit 147c35f6fe23822fb7b69cd0e3cfb2990d3fefec
Showing with 31 additions and 0 deletions.
  1. +31 −0 webpack.config.js
@@ -0,0 +1,31 @@
const path = require('path');

// We'll refer to our source and dist paths frequently, so let's store them here
const PATH_SOURCE = path.join(__dirname, './src');
const PATH_DIST = path.join(__dirname, './dist');

// Export a configuration object
module.exports = {
// Tell Webpack to do some optimizations for our environment (development
// or production). Webpack will enable certain plugins and set
// `process.env.NODE_ENV` according to the environment we specify.
mode: 'development',

// The point or points to enter the application. This is where Webpack will
// start. We generally have one entry point per HTML page. For single-page
// applications, this means one entry point. For traditional multi-page apps,
// we may have multiple entry points.
entry: [
path.join(PATH_SOURCE, './index.js'),

// Tell Webpack where to emit the bundles it creates and how to name them.
output: {
path: PATH_DIST,
filename: 'js/[name].[hash].js',

0 comments on commit 147c35f

Please sign in to comment.