UNPKG

react-keenio

Version:
44 lines (39 loc) 1 kB
/* global __dirname */ var path = require('path'); var webpack = require('webpack'); var CopyWebpackPlugin = require('copy-webpack-plugin'); var dir_js = path.resolve(__dirname, 'src'); var dir_build = path.resolve(__dirname, 'build'); module.exports = { entry: path.resolve(dir_js, 'index.js'), output: { path: dir_build, filename: 'bundle.js' }, devServer: { contentBase: dir_build, port: 8008 }, module: { loaders: [ { loader: 'babel-loader', test: dir_js, }, ] }, plugins: [ // Simply copies the files over new CopyWebpackPlugin([ { from: 'index.html' } // to: output.path ]), // Avoid publishing files when compilation fails new webpack.NoErrorsPlugin() ], stats: { // Nice colored output colors: true }, // Create Sourcemaps for the bundle devtool: 'source-map', };