Next.js Discord

Discord Forum

Turbopack equivalent of webpack config

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Sloth bearOP
webpack: (config) => {
    console.log(path.join(path.dirname(require.resolve('html-dom-parser')), 'server/html-to-dom.js'))
    config.module.rules = [
      ...config.module.rules,
      {
        test: /html-react-parser\/index\.js$/,
        resolve: {
          alias: {
            'html-dom-parser': path.join(path.dirname(require.resolve('html-dom-parser')), 'server/html-to-dom.js'),
          },
        },
      },
    ];
    return config;
  },


what would the equivalent of this be in turbopack config?

0 Replies