laravel-mix / laravel-mix

The power of webpack, distilled for the rest of us.
MIT License
5.27k stars 808 forks source link

Vue + SSR webpackJsonp is not defined #1839

Closed algha closed 5 years ago

algha commented 5 years ago

Hello I am working on a Laravel Project wich uses VueJS. before I was developing only in pre-rendering way. now project almost done. but I wanted to support SEO, so starting to change to SSR. I have done V8js PHP extension. but the problem is in webpack.mix.js

`const { mix } = require('laravel-mix'); let webpack = require('webpack'); mix.setPublicPath('public');

mix .js('./src/Packages/Front/Resource/assets/js/client.js', 'public/js') .js('./src/Packages/Front/Resource/assets/js/server.js', 'public/js') `

in this code, SSR no error.

but if i add .extract(['jQuery' ]) after the mix.js() error will be come up like this. V8Js::compileString():1: ReferenceError: webpackJsonp is not defined

of course, i added in this order the files `

` dose anyone know what exactly this error? it is taking my lots of time. already takes 3 days. I am stuck here.
noogen commented 5 years ago

I've responded to your question on stackoverflow: https://stackoverflow.com/questions/53632481/vue-ssr-webpackjsonp-is-not-defined/53652681#53652681