UNPKG

react-keyboard-time-input

Version:
50 lines (47 loc) 1.08 kB
var path = require('path'); var webpack = require('webpack'); // var HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ template: './demo/demo.html', filename: 'index.html', inject: 'body' }); module.exports = { devtool: 'source-map', entry: './demo/index.js', output: { path: path.join(__dirname, 'docs'), filename: 'bundle.js' }, plugins: [ HtmlWebpackPluginConfig, new webpack.HotModuleReplacementPlugin(), new webpack.NoEmitOnErrorsPlugin() ], module: { loaders: [ { test: /\.js$/, loader: 'babel-loader', include: __dirname, exclude: /node_modules/ }, { test: /\.css?$/, loaders: ['style-loader', 'raw-loader'], include: __dirname, exclude: /node_modules/ }, { test: /\.(png|jpg|gif)$/, use: [ { loader: 'file-loader', options: {} } ] } ] } };