<aside> 💡
번들링 후 최종적으로 생성하는 파일 or 디렉토리
</aside>
단일 엔트리
// webpack.config.js
const path = require('path');
module.exports = {
entry: './src/index.tsx',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
},
};
객체 구문
// webpack.config.js
const path = require('path');
module.exports = {
entry: {
app: './src/index.tsx',
adminApp: './src/admin.ts',
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, 'dist'),
},
};
// webpack.config.js
module.exports = {
output: {
clean: true,
},
};
<aside> 💡
코드 스플리팅과 브라우저 캐시 관리 용이
</aside>