mirror of
https://github.com/xsf0105/vue3-h5-template.git
synced 2025-04-06 04:00:04 +08:00
35 lines
709 B
JavaScript
35 lines
709 B
JavaScript
const path = require('path');
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
const VueLoaderPlugin = require('vue-loader/lib/plugin');
|
|
|
|
module.exports = {
|
|
entry: {
|
|
bundle: path.resolve(__dirname, '../src/index.js')
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist'),
|
|
filename: '[name].[hash].js'
|
|
},
|
|
resolve: {
|
|
extensions: ['*', '.js', '.json', '.vue'],
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.vue$/,
|
|
loader: 'vue-loader'
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
use: 'babel-loader',
|
|
exclude: /node_modules/
|
|
},
|
|
]
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
template: path.resolve(__dirname, '../index.html')
|
|
}),
|
|
new VueLoaderPlugin(),
|
|
]
|
|
}; |