const HtmlWebpackPlugin = require('html-webpack-plugin'); const { VueLoaderPlugin } = require('vue-loader'); const webpack = require('webpack'); const { PROJECT_NAME, BASE_DIR, SERVICE_STATUS } = require('./Global'); module.exports = { name: PROJECT_NAME, mode: SERVICE_STATUS, devtool: 'source-map', entry: { app: [`${BASE_DIR}/invest/views/index.js`] }, module: { rules: [{ test: /\.vue?$/, loader: 'vue-loader', }, { test: /\.(js|jsx)?$/, loader: 'babel-loader', }, { test: /\.css$/, use: ['vue-style-loader', 'css-loader'] }, { test: /\.(jpe?g|png|gif|svg|ttf|eot|woff|woff2)$/i, use: [{ loader: 'url-loader', options: { limit: 8192, fallback: require.resolve('file-loader') } }] }], }, plugins: [ new HtmlWebpackPlugin({ template: `${BASE_DIR}/invest/views/index.html`, }), new VueLoaderPlugin(), new webpack.HotModuleReplacementPlugin(), ], output: { path: `${BASE_DIR}/invest/build`, // __dirname: webpack.config.js 파일이 위치한 경로 filename: 'bundle.js', }, }