From 38192d7d93254893ef0e7ec3107c022da8be499f Mon Sep 17 00:00:00 2001 From: Jibin Thomas Date: Sun, 14 Oct 2018 14:57:17 +0530 Subject: Refactor and modernize code base (#5) Fixes #3 - * Updated all the dependencies to latest version * Config files updated * Moved the files to src directory * Updated README file * Configured package.json and README.md for production build * Added gh-pages package * Added production details in README.md * Removed unnecessary script tag from index.html * Change the fonts to ubuntu --- webpack.config.js | 51 +++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 12 deletions(-) (limited to 'webpack.config.js') diff --git a/webpack.config.js b/webpack.config.js index 7f27918..51d90dc 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,15 +1,42 @@ -var bourbon = require('node-bourbon').includePaths - +const HtmlWebPackPlugin = require('html-webpack-plugin'); module.exports = { - entry: './index.js', - output: { - path: __dirname, - filename: 'bundle.js' - }, - module: { - loaders: [ - { test: /\.js$/, loader: 'babel' }, - { test: /\.scss$/, loader: 'style!css!sass?includePaths[]=' + bourbon } + module: { + rules: [ + { + test: /\.js$/, + exclude: /node_modules/, + use: { + loader: 'babel-loader' + } + }, + { + test: /\.html$/, + use: [ + { + loader: 'html-loader' + } ] - } + }, + { + test: /\.scss$/, + use: [ + { + loader: 'style-loader' + }, + { + loader: 'css-loader' + }, + { + loader: 'sass-loader' + } + ] + } + ] + }, + plugins: [ + new HtmlWebPackPlugin({ + template: './src/index.html', + filename: './index.html' + }) + ] }; -- cgit v1.3.1