0

I'm currently working on a Node.js React project that uses Webpack for bundling. My Webpack configuration uses the node-polyfill-webpack-plugin to automatically include polyfills for any Node.js core modules that I'm using in my front-end code.

I'm considering migrating to Turbo, a next-generation toolchain for frontend development, to improve the speed and efficiency of my builds. However, I'm not sure how to handle the Node.js polyfills in Turbo.

Does Turbo have a direct equivalent to the node-polyfill-webpack-plugin? If not, what's the recommended approach for polyfilling Node.js core modules in Turbo?

Here's my current Webpack configuration for reference:

const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

module.exports = {
    // Other rules...
    plugins: [
        new NodePolyfillPlugin()
    ]
};
OpenGears
  • 102
  • 7

0 Answers0