Skip to content

Instantly share code, notes, and snippets.

@karthikeayan
Created February 24, 2018 19:26
Show Gist options
  • Save karthikeayan/89b223868e09d6684d14c177ad9017ee to your computer and use it in GitHub Desktop.
Save karthikeayan/89b223868e09d6684d14c177ad9017ee to your computer and use it in GitHub Desktop.
webpack 3 basic loaders
module.exports = {
entry: "./entry.js",
output: {
path: __dirname,
filename: "bundle.js"
},
module: {
rules: [{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.(js|jsc)$/,
loader: "babel-loader",
exclude: /node_modules/,
query: {
presets: ['es2015', 'stage-0', 'react'],
plugins: ['transform-runtime']
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment