Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle analyzer works with next-compose-plugins@1.0.3 but not next-compose-plugins@2.2.0 #26

Open
saltycrane opened this issue Nov 8, 2019 · 4 comments

Comments

@saltycrane
Copy link

saltycrane commented Nov 8, 2019

Using @next/bundle-analyzer does not work for me with the latest 2.2.0 version of next-compose-plugins. It does work with version 1.0.3.

I set up a minimal repro repo with 3 branches that test 3 cases:

"WORKS" means that the bundle analyzer files are opened in the browser after running:

npm install
npm run analyze
@pradyuman
Copy link

Running into the same issue here.

@ScreamZ
Copy link

ScreamZ commented Nov 29, 2019

const path = require("path");
const withPlugins = require("next-compose-plugins");
const withBundleAnalyzer = require("@next/bundle-analyzer");

const plugins = [[withBundleAnalyzer, { enabled: true }]];

const nextConfig = {
  webpack(config) {
    // Import alias, to use with tsconfig.json
    config.resolve.alias["@modules"] = path.join(__dirname, "modules");

    return config;
  },
};

module.exports = withPlugins(plugin, nextConfig);

Example of not working configuration with bundle analyzed :(

@rikjacobs1390
Copy link

I have exactly the same issue! Any news/updates/fixes on this subject?

@pentolbakso
Copy link

pentolbakso commented May 1, 2020

try this:

const withPlugins = require("next-compose-plugins");
const css = require("@zeit/next-css");
const withBundleAnalyzer = require("@next/bundle-analyzer")({
  enabled: true,
});

const nextPlugins = [[css], [withBundleAnalyzer({})]];

current setup:
"next": "9.3.5",
"next-compose-plugins": "^2.2.0",
"@next/bundle-analyzer": "^9.3.6"

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

No branches or pull requests

5 participants