Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var path = require('path')
- var webpack = require('webpack')
- module.exports = {
- entry: [
- 'react-hot-loader/patch',
- 'webpack-hot-middleware/client',
- path.join(__dirname, '/../src/index.js'),
- // path.join(__dirname, '/../src/'),
- // path.join(__dirname, '/../src/setupTest.js'),
- // path.join(__dirname, '/../src/shim.js'),
- ],
- // entry: {
- // app: path.join(__dirname, '/../src/index.js')
- // },
- output: {
- filename: 'bundle.js',
- path: path.join(__dirname, '/../dist'),
- publicPath: '/static/'
- },
- devtool: 'inline-source-map',
- module: {
- rules: [
- {
- test: /\.jsx?$/,
- use: [
- 'babel-loader',
- ],
- exclude: /node_modules/,
- },
- {
- test: /\.scss/,
- use: [
- 'style-loader', {
- loader: 'css-loader',
- options: {
- sourceMap: true,
- },
- }, {
- loader: 'sass-loader',
- options: {
- sourceMap: true,
- includePaths: [path.join(__dirname, '/../src/assets/scss')],
- },
- },
- ],
- }
- ],
- },
- plugins: [
- new webpack.HotModuleReplacementPlugin(),
- new webpack.NamedModulesPlugin(),
- new webpack.NoEmitOnErrorsPlugin()
- ],
- devServer: {
- port: 8080,
- historyApiFallback: true,
- hot: true
- },
- }
Add Comment
Please, Sign In to add comment