Skip to content

Support with Next.JS #68

Description

@ermauliks

Hello, I'm trying to integrate this webpack plugin with my Next.JS web application. Following is my next.config.js. It works in the production mode but not in the development mode.

Did anyone successfully integrate this plugin with the Next.JS?

const HtmlWebpackPlugin = require('html-webpack-plugin');
const DynamicCdnWebpackPlugin = require("dynamic-cdn-webpack-plugin");

module.exports = withPlugins([withTM], {
  webpack: (config, options) => {
    if (!options.isServer) {
      config.plugins.push(
        new DynamicCdnWebpackPlugin({
          only: ['react', 'react-dom']
        }),
      )
    return config;
  }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions