UNPKG

react-count-up

Version:
30 lines (25 loc) 716 B
var webpack = require('webpack'); var path = require('path'); var BUILD_DIR = path.resolve(__dirname, 'lib/'); var APP_DIR = path.resolve(__dirname, 'src/'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({ template: './src/index.html', filename: 'index.html', inject: 'body' }) var config = { entry: APP_DIR + '/index.js', output: { path: BUILD_DIR, filename: 'index.js' }, module : { loaders: [ { test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.jsx$/, loader: 'babel-loader', exclude: /node_modules/ } ] }, plugins: [HtmlWebpackPluginConfig] }; module.exports = config;