| 123456789101112131415161718192021222324 |
- const path = require('path');
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
- module.exports = {
- entry: './wwwroot/lib/index.js',
- output: {
- filename: 'bundle.js',
- path: path.resolve(__dirname, 'wwwroot/js')
- },
- mode: 'production', // live : production, develop : 'development'
- module: {
- rules: [
- {
- test: /\.css$/, // CSS 파일에 대한 규칙
- use: [MiniCssExtractPlugin.loader, 'css-loader'], // CSS를 별도 파일로 추출
- }
- ]
- },
- plugins: [
- new MiniCssExtractPlugin({
- filename: '../css/bundle.css',
- }),
- ]
- };
|