UNPKG

react-highlight-words

Version:

React component to highlight words within a larger body of text

42 lines (40 loc) 881 B
const HtmlWebpackPlugin = require('html-webpack-plugin') const path = require('path') const webpack = require('webpack') module.exports = { devtool: 'source-map', entry: [ 'babel/polyfill', './website/index.js' ], output: { path: 'build', filename: 'static/[name].js' }, plugins: [ new HtmlWebpackPlugin({ filename: 'index.html', inject: true, template: './website/index.html' }), new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production') } }) ], module: { loaders: [ { test: /\.js$/, loader: 'babel', exclude: path.join(__dirname, 'node_modules') }, { test: /\.css$/, loaders: ['style', 'css?modules&importLoaders=1', 'cssnext'], exclude: path.join(__dirname, 'node_modules') } ] } }