How to use the @sanity/webpack-integration/v3.getPartResolverPlugin function in @sanity/webpack-integration

To help you get started, we’ve selected a few @sanity/webpack-integration examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / sanity / packages / @sanity / server / src / configs / webpack.config.js View on Github external
},
        {
          test: /\.(jpe?g|png|gif|svg|webp|woff|woff2|ttf|eot|otf)$/,
          use: {
            loader: resolve('file-loader'),
            options: {name: 'assets/[name]-[hash].[ext]'}
          }
        },
        webpackIntegration.getPartLoader(wpIntegrationOptions)
      ]
    },
    profile: config.profile || false,
    plugins: [
      webpackIntegration.getEnvPlugin(wpIntegrationOptions),
      new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en|nb/),
      webpackIntegration.getPartResolverPlugin(wpIntegrationOptions),
      cssExtractor,
      commonChunkPlugin
    ].filter(Boolean)
  }
}