G
G
grabbee2021-04-02 14:40:34
webpack
grabbee, 2021-04-02 14:40:34

How to configure WebpackCdnPlugin for Nuxt SSR?

Used WebpackCdnPlugin before to reduce build for client. Then vuex, vue-router, axios and other external dependencies connected through it. Now I tried to enable SSR and it didn't work. I did not find packages configured via WebpackCdnPlugin - if I disable it completely, then the build works.

Are they incompatible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Velichko, 2021-04-02
@Zoxon

On the server will not work, do it only for the client.

extend(config, { isClient }) {
  // Extend only webpack config for client-bundle
  if (isClient) {
    config.devtool = 'source-map'
  }
}

https://nuxtjs.org/docs/2.x/configuration-glossary...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question