Created
February 24, 2018 19:26
-
-
Save karthikeayan/89b223868e09d6684d14c177ad9017ee to your computer and use it in GitHub Desktop.
webpack 3 basic loaders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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