Last active
July 14, 2018 15:02
-
-
Save AjayPoshak/35ac769c56326a393458f8ea0fa084a1 to your computer and use it in GitHub Desktop.
Initial webpack config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'), | |
AssetsPlugin = require('assets-webpack-plugin'), | |
HtmlWebpackPlugin = require('html-webpack-plugin'); | |
module.exports = { | |
devtool: 'inline-source-map', | |
entry: './client/index.js', | |
output: { | |
filename: '[name].bundle.js', | |
path: path.resolve(__dirname, 'build/client'), | |
publicPath: 'build/client/' | |
}, | |
module: { | |
rules: [{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }] | |
}, | |
plugins: [ | |
new HtmlWebpackPlugin({ | |
template: './client/index.html', | |
title: 'Bus Booking in Africa' | |
}), | |
new AssetsPlugin({ | |
prettyPrint: true, | |
filename: 'assets.json', | |
path: path.resolve(__dirname, 'build') | |
}) | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment