Skip to content

Instantly share code, notes, and snippets.

@onrush1995
Forked from iamshaunjp/webpack.config.js
Last active November 8, 2018 08:01
Show Gist options
  • Save onrush1995/934f31f2adac812438838906e0e7a710 to your computer and use it in GitHub Desktop.
Save onrush1995/934f31f2adac812438838906e0e7a710 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: {
rules: [
{
test: /\.js$/,
include: path.resolve(__dirname, 'src'),
loader: 'babel-loader',
query: {
presets: ['react', 'es2015']
}
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
}
]
}
};
@onrush1995
Copy link
Author

screenshot 2018-11-08 at 9 57 58

"In your command line"- $ npm install babel-loader@7 babel-core

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