>> Tutorial Webpack for Beginners
1. Create webpack.config
module.exports = {
//define entry point
entry: './src/script-1.js',
//define output point
output: {
path: 'dist',
filename: 'bundle.js'
},
};
- entry: entry point
- output: output point
+ path: this is distribution folder (output folder)
+ filename: this is filename bundle.js
* Note: need put all file to src
2. Running webpack
webpack
=> output file dist/bundle.js using in index.html
>> Tutorial Webpack for Beginners
Thank you

No comments:
Post a Comment