Skip to content

Instantly share code, notes, and snippets.

@samverneck
Forked from iamshaunjp/webpack.config.js
Created July 10, 2017 14:54
Show Gist options
  • Save samverneck/cf2cd6e898abe9399e3ec8b3ac005ad4 to your computer and use it in GitHub Desktop.
Save samverneck/cf2cd6e898abe9399e3ec8b3ac005ad4 to your computer and use it in GitHub Desktop.
var path = require('path');
module.exports = {
entry: path.resolve(__dirname, 'src') + '/app/index.js',
output: {
path: path.resolve(__dirname, 'dist') + '/app',
filename: 'bundle.js',
publicPath: '/app/'
},
module: {
loaders: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
}
]
}
};
@samverneck
Copy link
Author

const path = require('path');

module.exports = {

    entry: path.resolve(__dirname, 'src') + '/app/index.js',
    output: {
        path: path.resolve(__dirname, 'dist') + '/app',
        filename: 'bundle.js',
        publicPath: '/app/'
    },
    module: {
        loaders: [
            {
                test: /\.js$/,
                include: path.resolve(__dirname, 'src'),
                loader: 'babel-loader',
                query: {
                    presets: ['react', 'es2015']
                }
            },
            {
                test: /\.css$/,
                loader: 'style-loader!css-loader'
            }
        ]
    }
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment