webpack.config.js
const path = require('path')
const webpack = require('webpack');
const { VueLoaderPlugin } = require('vue-loader');
module.exports = {
mode: 'development',
entry: {
index: './src/index.js',
},
output: {
path: path.resolve(__dirname, './dist'),
filename: '[name].bundle.js',
},
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader"
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|jpg|gif|svg)$/,
type: "asset/inline",
}
]
},
resolve: {
alias: {
vue$: 'vue/dist/vue.runtime.esm-bundler.js',
},
extensions: ["*", ".js", ".vue", ".json"]
},
plugins: [
new VueLoaderPlugin(),
new webpack.DefinePlugin({
__VUE_OPTIONS_API__: true,
__VUE_PROD_DEVTOOLS__: false,
}),
]
}