42 lines
1004 B
JavaScript
42 lines
1004 B
JavaScript
const path = require('path')
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
const { VueLoaderPlugin } = require('vue-loader')
|
|
|
|
module.exports = {
|
|
mode: 'development',
|
|
devtool: 'source-map',
|
|
entry: './serve/js/app.js',
|
|
output: {
|
|
path: path.resolve(__dirname, 'serve/build'),
|
|
filename: '[name].bundle.js',
|
|
clean: true
|
|
},
|
|
plugins: [
|
|
// new HtmlWebpackPlugin({
|
|
// template: './root.html',
|
|
// }),
|
|
new VueLoaderPlugin(),
|
|
],
|
|
devServer: {
|
|
port: 3000,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.vue$/,
|
|
loader: 'vue-loader',
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: [ '@babel/preset-env'],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
}
|
|
}
|