Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Plugin doesn't copy assets #452

Open
luka-bacic opened this issue Jun 6, 2021 · 0 comments
Open

Plugin doesn't copy assets #452

luka-bacic opened this issue Jun 6, 2021 · 0 comments

Comments

@luka-bacic
Copy link

luka-bacic commented Jun 6, 2021

Hi,

I am using prerender-spa-plugin 3.4.0 with Vue 3.0.11.

I'm running Ubuntu 18.04.5 LTS in WSL2

My plugin config options in vue.config.js are as follows:

const path = require('path');
const PrerenderSPAPlugin = require('prerender-spa-plugin');
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer;

module.exports = {
  // ...
  configureWebpack: {
    plugins: [
      new PrerenderSPAPlugin({
        staticDir: path.join(__dirname, 'dist'),
        outputDir: path.join(__dirname, 'prerendered'),
        routes: ['/'],
        renderer: new Renderer({
          renderAfterDocumentEvent: 'dataFetched',
        }),
      }),
    ],
  },
};

This creates an index.html in the prerendered folder, but it doesn't copy any of the other files under dist folder (so all assets under css/ javascript/ and fonts/ are not copied over).

Is this intended behaviour of this plugin? I haven't been able to find any config options that could modify this. I've also searched and couldn't find any issues online mentioning assets copying (whether it is intended or not)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant