I wonder, what if you try to request a simple API JSON response that says:
{"name": "Joe"}
See if that works.
I assume you're requesting the login page?
What is the exact request that you sent?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
i have this laravel-vue project that i was asked to setup at work and the vue is served using webpack, and everytime that i try to access the laravel route api, this is the response i get from the network tab of the chrome browser Request URL: https://domain.test/v1/crm/login Referrer Policy: strict-origin-when-cross-origin Provisional headers are shown Learn more Accept: application/json, text/plain, / Content-Type: application/json Referer: https://domain.test:8080/ and even if i try to access the api endpoint using my postman and browser all i get back is Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log. Apache/2.4.51 (Win64) PHP/7.2.34 Server at prepcrm.test Port 80
this is the webpack config // const ManifestPlugin = require('webpack-manifest-plugin') const {VueLoaderPlugin} = require('vue-loader') const webpack = require('webpack') const HtmlWebpackPlugin = require('html-webpack-plugin')
const path = require('path') const itemsResPath = 'resources/crm' const publicPath = 'public/crm' const env = process.env.NODE_ENV const port = process.env.PORT || 8080
const isProduction = env === 'production'
const isDevServer = process.argv.some(v => v.includes('webpack-dev-server'));
module.exports = {
mode: env,
devtool: isProduction ? undefined : 'cheap-module-eval-source-map',
entry: path.resolve(__dirname, itemsResPath, 'js/index.js'),
output: {
path: path.resolve(__dirname, publicPath),
filename: '[name].[hash:6].js',
chunkFilename: 'js/[name].[contenthash:6].js',
publicPath: isDevServer ? https://localhost:${port}/ : '/crm/'
},
devServer: {
hot: true,
host: 'prepcrm.test',
https: true,
noInfo: false,
contentBase: path.join(__dirname, publicPath),
publicPath: '/',
watchOptions: {
poll: false
}
},
module: {
rules: [
{
test: /.vue$/,
use: 'vue-loader'
},
{
test: /.(s[ac]|c)ss$/,
include: [
/node_modules/,
path.resolve(__dirname, 'resources')
],
use: [
'vue-style-loader',
{
loader: 'css-loader',
options: {
modules: false,
localIdentName: '[local]_[hash:base64:8]'
}
},
'sass-loader'
]
},
{
test: /.jsx?$/,
exclude: /node_modules/,
use: 'babel-loader'
},
{
test: /.(png|jpe?g|gif)$/,
loader: 'file-loader',
options: {
name: 'images/[name].[ext]?[hash:6]',
publicPath: isDevServer ? '/' : '/crm'
}
},
{
test: /.(woff2?|ttf|eot|svg|otf)$/,
loader: 'file-loader',
options: {
name: 'fonts/[name].[ext]?[hash:6]',
publicPath: isDevServer ? '/' : '/crm',
basePath: 'crm',
writeToFileEmit: true
}
}
]
},
plugins: [
new VueLoaderPlugin(),
new webpack.DefinePlugin({
PRODUCTION: env === 'production'
}),
new HtmlWebpackPlugin({
filename: isDevServer ? 'index.html' : path.resolve(__dirname, 'resources/views/index.blade.php'),
template: path.resolve(__dirname, 'resources/crm/index.html')
})
],
resolve: {
alias: {
'vue$': 'vue/dist/vue.common.js',
'my-lib': path.resolve(__dirname, itemsResPath + '/js/lib'),
components: path.resolve(__dirname, itemsResPath + '/js/components'),
package: path.resolve(__dirname, './package.json'),
assets: path.resolve(__dirname, itemsResPath + '/js/assets'),
views: path.resolve(__dirname, itemsResPath + '/js/views/'),
'vuex-store': path.resolve(__dirname, itemsResPath + '/js/store')
},
extensions: ['*', '.js', '.jsx', '.vue']
},
optimization: {
splitChunks: {
cacheGroups: {
vendor: {
test: /node_modules/, // you may add "vendor.js" here if you want to
name: 'vendor',
chunks: 'initial',
enforce: true
}
}
},
runtimeChunk: {
name: 'manifest'
}
}
}
Please or to participate in this conversation.