'rollup how to excludes node_modules like webpack

I use vite to build,but i don't find the item to excludes node_modules, i konw that webpack can use excludes node_modules like this :

   rules: [{
    test: /\.vue$/,
    loader: 'vue-loader',
    exclude: /node_modules/,
    include: [resolve('src')],
    options: vueLoaderConfig
  },
  {
    test: /\.js[x]?$/,
    include: [resolve('src')],
    exclude: /node_modules/,
    loader: 'happypack/loader?id=happybabel'
  },


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source