Created
July 25, 2017 00:45
-
-
Save T4rk1n/042de528a27dd1e60a70a06c557e74c4 to your computer and use it in GitHub Desktop.
basic webpack config
This file contains 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
const path = require('path') | |
const distFolder = path.resolve(__dirname, 'dist') | |
const srcFolder = path.resolve(__dirname, 'src') | |
module.exports = { | |
entry: ['./src/app.js'], | |
output: { | |
filename: 'app.min.js', | |
path: distFolder | |
}, | |
devServer: { | |
contentBase: distFolder, | |
compress: true, | |
port: 4040 | |
}, | |
module: { | |
loaders: [ | |
{ | |
test: /\.jsx?$/, | |
loader: "babel-loader", | |
include: path.join(__dirname, "src"), | |
query: { | |
presets: ["env", "react"], | |
plugins: [ | |
"transform-object-rest-spread" | |
] | |
} | |
} | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment