Closed pet1330 closed 6 years ago
Have you looked into the Laravel Mix docs? If the render function is returning undefined my guess is that there was a problem in the webpack build phase
I have the same problem
I connect the webpack.config.js file to the root of the laravel project from the SSR-manual:
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const isProduction = process.env.NODE_ENV === 'production'
module.exports = {
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
extractCSS: isProduction
}
},
]
},
plugins: isProduction
? [new ExtractTextPlugin({ filename: 'common.[chunkhash].css' })]
: []
}
but there is no result
Hi,
I was reading the related article, it has really helped! I've managed to get a project working, but am having an issue with the style tags not working.
Whenever you add a
<style>
section to a Vue component that you are trying to SSR, therender
function inAppController
returnsundefined
. Using your repository, I added empty style tagsto the bottom of your
resource/assets/js/components/App.vue
file and now it will only returnundefined
.Do you have any idea why this might be happening or how to fix it?