Setup Golang server with Vue3 using InertiaJS
This commit is contained in:
41
webpack.config.js
Normal file
41
webpack.config.js
Normal file
@@ -0,0 +1,41 @@
|
||||
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'],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user