UNPKG

redux-react-session

Version:

[![NPM version](https://img.shields.io/npm/v/redux-react-session.svg?style=flat)](https://npmjs.org/package/redux-react-session) [![Build status: Linux](https://travis-ci.org/bernabe9/redux-react-session.svg?branch=master)](https://travis-ci.org/bernabe9/

64 lines (62 loc) 2.71 kB
import webpack from 'webpack'; import HtmlWebpackPlugin from 'html-webpack-plugin'; import autoprefixer from 'autoprefixer'; import path from 'path'; export default { resolve: { extensions: ['*', '.js', '.jsx', '.json'] }, devtool: 'eval-source-map', // more info:https://webpack.github.io/docs/build-performance.html#sourcemaps and https://webpack.github.io/docs/configuration.html#devtool entry: [ // must be first entry to properly set public path './src/webpack-public-path', 'webpack-hot-middleware/client?reload=true', path.resolve(__dirname, 'src/index.js') // Defining path seems necessary for this to work consistently on Windows machines. ], target: 'web', // necessary per https://webpack.github.io/docs/testing.html#compile-and-test output: { path: path.resolve(__dirname, 'dist'), // Note: Physical files are only output by the production build task `npm run build`. publicPath: '/', filename: 'bundle.js' }, plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('development'), // Tells React to build in either dev or prod modes. https://facebook.github.io/react/downloads.html (See bottom) __DEV__: true }), new webpack.HotModuleReplacementPlugin(), new webpack.NoEmitOnErrorsPlugin(), new HtmlWebpackPlugin({ // Create HTML file that includes references to bundled CSS and JS. template: 'src/index.ejs', minify: { removeComments: true, collapseWhitespace: true }, inject: true }), new webpack.LoaderOptionsPlugin({ minimize: false, debug: true, noInfo: true, // set to false to see a list of every file being bundled. options: { sassLoader: { includePaths: [path.resolve(__dirname, 'src', 'scss')] }, context: '/', postcss: () => [autoprefixer], } }) ], module: { rules: [ { test: /\.jsx?$/, exclude: /node_modules/, loaders: ['babel-loader'] }, { test: /\.eot(\?v=\d+.\d+.\d+)?$/, loader: 'file-loader' }, { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: 'url-loader?limit=10000&mimetype=application/font-woff' }, { test: /\.[ot]tf(\?v=\d+.\d+.\d+)?$/, loader: 'url-loader?limit=10000&mimetype=application/octet-stream' }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url-loader?limit=10000&mimetype=image/svg+xml' }, { test: /\.(jpe?g|png|gif)$/i, loader: 'file-loader?name=[name].[ext]' }, { test: /\.ico$/, loader: 'file-loader?name=[name].[ext]' }, { test: /(\.css|\.scss)$/, loaders: ['style-loader', 'css-loader?sourceMap', 'postcss-loader', 'sass-loader?sourceMap'] } ] } };