Skip to content

Instantly share code, notes, and snippets.

@bummzack
Last active March 8, 2017 15:02
Show Gist options
  • Save bummzack/3c2ce81fed317837a96de4918212c5d4 to your computer and use it in GitHub Desktop.
Save bummzack/3c2ce81fed317837a96de4918212c5d4 to your computer and use it in GitHub Desktop.
Minimalistic Webpack 2.x config
{
"name": "meetup",
"version": "1.0.0",
"description": "Webpack React Setup for SilverStripe Projects",
"main": "index.js",
"author": "Roman Schmid",
"license": "MIT",
"scripts": {
"build": "webpack --bail"
},
"devDependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^6.4.0",
"babel-preset-es2015": "^6.22.0",
"babel-preset-react": "^6.23.0",
"webpack": "^2.2.1"
}
}
const webpack = require('webpack');
module.exports = {
entry: {
'index' : `./src/index.jsx`
},
output: {
path: './dist',
filename: '[name].js',
},
resolve: {
modules: [ 'node_modules', 'src' ],
extensions: [".js", ".jsx", ".scss", ".css", ".html"]
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: [/node_modules/],
use: {
loader: 'babel-loader',
options: {
presets: ['es2015', 'react'],
comments: false,
}
}
}
]
},
plugins: [],
devtool: "source-map"
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment