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

Can't resolve 'console-browserify' #16

Closed
targeral opened this issue Jun 30, 2021 · 3 comments
Closed

Can't resolve 'console-browserify' #16

targeral opened this issue Jun 30, 2021 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@targeral
Copy link

My project is using pnpm and when using this plugin, the following error is reported:

Module not found: Error: Can't resolve 'console-browserify' in '/Users/targeral/demo/pnpm/demo4/mwa/src.

I need to configure the following in the .npmrc file for it to work properly. This configuration raises console-browserify to the top-level node_modules

public-hoist-pattern[]=console-browserify

I think I can only configure all the dependencies for this plugin in .npmrc for now.

I'd like to know if there is a better way or if it is compatible with pnpm

@Richienb
Copy link
Owner

Richienb commented Jun 30, 2021

We'll need to use require.resolve to get the absolute paths of each of the modules so they will always be findable.

@Richienb Richienb added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jun 30, 2021
@chengcyber
Copy link

I got a question here. Is it necessary to polyfill console?

@Richienb
Copy link
Owner

Is it necessary to polyfill console?

Only if you want to perfectly replicate Webpack 4 behaviour. Otherwise, see excludeAliases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants