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

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. #16

Open
Michaelzhouisnotwhite opened this issue Jun 20, 2022 · 1 comment

Comments

@Michaelzhouisnotwhite
Copy link

webpack5 have moved plyfills for node.js. However web3.js use polyfill. So You better fix this.

I have solved problems on webpack by these command:

npm install node-polyfill-webpack-plugin

Then, add the plugin in vite.config.ts as follows.

const { defineConfig } = require("@vue/cli-service");
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");

module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack: {
    plugins: [new NodePolyfillPlugin()],
  },
});

NOTE: refer to thie website: https://vue-dapp-docs.netlify.app/configurations.html#vue-cli

@MikeCheng1208
Copy link
Owner

thx!
I recently will fix that's query.

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

2 participants