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

with-webpack-bundle-size-analyzer no longer works #26715

Closed
d3lm opened this issue Jun 29, 2021 · 5 comments
Closed

with-webpack-bundle-size-analyzer no longer works #26715

d3lm opened this issue Jun 29, 2021 · 5 comments
Labels
bug Issue was opened via the bug report template. examples Issue was opened via the examples template.

Comments

@d3lm
Copy link
Contributor

d3lm commented Jun 29, 2021

What example does this report relate to?

with-webpack-bundle-size-analyzer

What version of Next.js are you using?

latest

What version of Node.js are you using?

14.x

What browser are you using?

Chrome

What operating system are you using?

macOS

How are you deploying your application?

/

Describe the Bug

I have noticed that with-webpack-bundle-size-analyzer no longer works. When I added some StackBlitz buttons this one definitely worked. Here's the error I am seeing:

TypeError: compiler.plugin is not a function
    at WebpackBundleSizeAnalyzerPlugin.apply (/home/projects/jvmikmakp.github/node_modules/webpack-bundle-size-analyzer/build/src/plugin.js:15:18)
    at createCompiler (/home/projects/jvmikmakp.github/node_modules/next/dist/compiled/webpack/bundle5.js:141349:12)
    at create (/home/projects/jvmikmakp.github/node_modules/next/dist/compiled/webpack/bundle5.js:141402:16)
    at webpack (/home/projects/jvmikmakp.github/node_modules/next/dist/compiled/webpack/bundle5.js:141426:32)
    at f (/home/projects/jvmikmakp.github/node_modules/next/dist/compiled/webpack/bundle5.js:98978:16)
    at eval (/home/projects/jvmikmakp.github/node_modules/next/dist/build/compiler.js:4:172)
    at new Promise (<anonymous>)
    at runCompiler (/home/projects/jvmikmakp.github/node_modules/next/dist/build/compiler.js:4:106)
    at eval (/home/projects/jvmikmakp.github/node_modules/next/dist/build/index.js:12:128)
    at Span.traceAsyncFn (/home/projects/jvmikmakp.github/node_modules/next/dist/telemetry/trace/trace.js:6:590)

Here's a reproduction.

Expected Behavior

The example should work.

To Reproduce

  1. Open reproduction
  2. Run npm run analyze
@d3lm d3lm added bug Issue was opened via the bug report template. examples Issue was opened via the examples template. labels Jun 29, 2021
@d3lm d3lm mentioned this issue Jun 29, 2021
20 tasks
@ristomatti
Copy link

The example seems to link to this one now https://github.com/vercel/next.js/tree/canary/examples/analyze-bundles. Have you tried that one? It works perfectly fine on Next.js 11 with our codebase at least (haven't tied the example).

@d3lm
Copy link
Contributor Author

d3lm commented Oct 29, 2021

Yea seems to work with older versions but not with the latest https://github.com/vercel/next.js/tree/canary/examples/with-webpack-bundle-size-analyzer

@ristomatti
Copy link

What version of Next.js are you using?
latest

It might be more helpful for the team to specify the exact version. Since this was posted Jun 29, I doubt anyone would go through the trouble of figuring out which version was the latest at that time or if it means latest public release or latest canary release.

@balazsorban44
Copy link
Member

https://github.com/vercel/next.js/tree/canary/examples/analyze-bundles is the up-to-date version, and with-webpack-bundle-size-analyzer is going to be removed.

kodiakhq bot pushed a commit that referenced this issue Dec 23, 2021
`with-webpack-bundle-analyzer` and `with-webpack-bundle-size-analyzer` are a duplicate/outdated versions of the `analyze-bundles` example and thus should be removed to avoid confusion.

Related: #26715
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. examples Issue was opened via the examples template.
Projects
None yet
Development

No branches or pull requests

3 participants