Skip to content

Instantly share code, notes, and snippets.

@dpickett
Last active October 22, 2016 16:22
Show Gist options
  • Select an option

  • Save dpickett/3691e1214202beddda9596a9d1f4289f to your computer and use it in GitHub Desktop.

Select an option

Save dpickett/3691e1214202beddda9596a9d1f4289f to your computer and use it in GitHub Desktop.

Revisions

  1. dpickett revised this gist Oct 21, 2016. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions webpack.config.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    require('babel-loader')
    var webpack = require('webpack');
    var CopyWebpackPlugin = require('copy-webpack-plugin');

    @@ -14,6 +15,14 @@ module.exports = {
    {
    test: /\.scss$/,
    loaders: ["style", "css", "sass"]
    },
    {
    test: /.jsx?$/,
    loader: 'babel-loader',
    exclude: /node_modules/,
    query: {
    presets: ['es2015', 'react']
    }
    }
    ]
    },
  2. dpickett revised this gist Oct 21, 2016. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion webpack.config.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    var webpack = require('webpack');
    var CopyWebpackPlugin = require('copy-webpack-plugin');

    module.exports = {
    entry: {
    @@ -17,6 +18,7 @@ module.exports = {
    ]
    },
    plugins: [
    new CopyWebpackPlugin([{from: './src/index.html', to: '/index.html'}]),
    new webpack.HotModuleReplacementPlugin()
    ],
    devtool: 'eval-source-map',
    @@ -25,4 +27,4 @@ module.exports = {
    inline: true,
    hot: true
    }
    }
    }
  3. dpickett created this gist Oct 21, 2016.
    28 changes: 28 additions & 0 deletions webpack.config.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    var webpack = require('webpack');

    module.exports = {
    entry: {
    path: './src/main.js'
    },
    output: {
    path: './build',
    filename: 'bundle.js'
    },
    module: {
    loaders: [
    {
    test: /\.scss$/,
    loaders: ["style", "css", "sass"]
    }
    ]
    },
    plugins: [
    new webpack.HotModuleReplacementPlugin()
    ],
    devtool: 'eval-source-map',
    devServer: {
    contentBase: './build',
    inline: true,
    hot: true
    }
    }