Last active
May 1, 2020 17:28
-
-
Save msacar/4dbf86038c81686f92abfad9adec4010 to your computer and use it in GitHub Desktop.
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
const webpack = require('webpack'); | |
const path = require('path'); | |
const config = { | |
//Başlangıç noktası olan ana javascript dosyamız | |
entry: './src/index.js', | |
mode: 'development', | |
//Ana dosyanın transpile edilip çıktığı dizin ve dosya adı. /dist/bundle.js | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: 'bundle.js' | |
}, | |
module: { | |
//Js uzantısı ile biten tüm dosyaların babel loader ile | |
// tarayıcıların anlayacağı dile çevrilmesini sağlayan kural. | |
rules: [ | |
{ | |
test: /\.js$/, | |
use: { | |
loader :"babel-loader" | |
}, | |
exclude: /node_modules/ | |
} | |
] | |
}, | |
//pluginleri buraya eklersiniz. | |
plugins: [ | |
] | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment