Closed kushagharahi closed 7 years ago
I'm having the exact same issue. Here's a Gist containing my webpack.conf.js
, index.html
, and main.js
. When I build, dist/index.html
has the exact same content as the original index.html
, except the JS bundles are injected into <head>
. I generated my app from the Vue CLI webpack template.
I am completely out of ideas, so any help I can get is greatly appreciated!
The same problem!
@csvwolf @kushagharahi I ended up writing my own webpack plugin that uses Nightmare.js to render the pages. It's pretty basic, but it might be worth a shot: https://github.com/esalter-va/webpack-static-site-generator
same problem +1
The same problem!
Same problem :(
Same problem!!
Hi, I don't think this is the same case. People here seem to have fully static SPAs. This is more like a version incompatibility between used components though I've not been able to repeat it. The best way for me to understand would be to share the exact repo that's not working and specify the environment.
You're right @jnrdt I was tired last night and misunderstood. I deleted my comment. I apologize.
@kushagharahi - I downloaded your code repository and there is a key problem with it. PhantomJS hits an exception because you forgot to transpile your .js
files into ES6.
Please add the following to webpack.config.js
:
// ....
module: {
rules: [
// ... other rules
{
test: /\.js$/,
loader: 'babel-loader',
include: [
path.join(__dirname, 'src')
],
exclude: path.join(__dirname, 'node_modules')
},
// .. the rest of your rules
]
},
// ....
// rest of webpack config
// ...
I have made this change and your site prerenders without issue.
@drewlustro YOU ARE BEAUTIFUL AND AMAZING. Thank you for the help. This can be closed.
Bahahaha. No worries my friend.
On Tue, Jun 13, 2017 at 12:46 AM, Kusha Gharahi notifications@github.com wrote:
@drewlustro https://github.com/drewlustro YOU ARE BEAUTIFUL AND AMAZING. Thank you for the help. This can be closed.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chrisvfritz/prerender-spa-plugin/issues/62#issuecomment-308005671, or mute the thread https://github.com/notifications/unsubscribe-auth/AAL5RYuSxqR8_CGvJXeh_a4nL0_BrKn7ks5sDhQ6gaJpZM4M-4_V .
@esalter-va big big thanks
same problem... =/
same problem
Project: https://github.com/kushagharahi/kushagharahi.github.io I am using vuejs2.0
I can not get the actual content of the page prerendered. All I get outputted is the original index.html w/o rendered content.
I've been scratching my head at what is wrong.
My entry point is
./src/scripts/main.js
You can see the issue in the
./dist
folder. Every path's index.html is identical to./dist/index.html
. IE:./dist/index.html
is the same as./dist/contact/index.html
which is equivalent of./src/static/index.html
(the original file).