UNPKG

react-toolbox-reactrouter-mocha-boilerplate

Version:

### Getting Started 1. Clone this repository 2. Run `npm install && npm start` 3. Visit `0.0.0.0:8080` in your browser

59 lines (57 loc) 1.57 kB
const path = require('path'); const webpack = require('webpack'); const autoprefixer = require('autoprefixer'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); module.exports = { context: __dirname, devtool: 'inline-source-map', entry: [ 'webpack-hot-middleware/client', './src/index.jsx' ], output: { path: path.join(__dirname, 'build'), filename: 'main-app.js', publicPath: '/' }, resolve: { extensions: ['', '.jsx', '.scss', '.js', '.json'], modulesDirectories: [ 'node_modules', path.resolve(__dirname, './node_modules') ] }, module: { loaders: [ { test: /(\.js|\.jsx)$/, exclude: /(node_modules)/, loader: 'babel', query: { presets:['es2015','react'] } }, // {//TODO: improve code before activating eslint // test: /(\.js|\.jsx)$/, // exclude: /(node_modules)/, // loader: 'eslint-loader' // }, { test: /(\.scss|\.css)$/, loader: ExtractTextPlugin.extract('style', 'css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass?sourceMap!toolbox') } ] }, toolbox: { theme: path.join(__dirname, '/src/toolbox-theme.scss') }, postcss: [autoprefixer], plugins: [ new ExtractTextPlugin('react-toolbox.css', { allChunks: true }), new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('development') }) ] };