⚠️ THIS PACKAGE IS DEPRECATED
This package is part of Sanity Studio v2, which has been superseded by Sanity Studio v3, the current major version released on Dec 7th, 2022. This package is no longer used/needed for Sanity Studio in its current version and will be retired on Dec 7th, 2023. The core packages for Sanity Studio v2 will only receive critical bug fixes until this date.
Please head over to the documentation for Sanity Studio v3 to learn more.
@sanity/webpack-integration
Tools and modules required for making partisan (the part system) work with webpack. Note: currently only works with Webpack 1.
Installing
npm install --save @sanity/webpack-integration
Usage
const sanityWebpack = require('@sanity/webpack-integration/v1')
const options = {
basePath: '/path/to/project',
env: 'production',
}
sanityWebpack.getPlugins(options)
sanityWebpack.getLoaders(options)
sanityWebpack.getPostcssPlugins(options)
sanityWebpack.getConfig(options)
sanityWebpack.getEnvPlugin(options)
sanityWebpack.getPartResolverPlugin(options)
sanityWebpack.getPartLoader(options)
sanityWebpack.getStyleResolver(options)
sanityWebpack.getPostcssImportPlugin(options)
License
MIT-licensed. See LICENSE.