@palette.dev/webpack-plugin
v1.9.1
Published
Upload webpack source maps to Palette
Maintainers
Readme
@palette.dev/webpack-plugin
Installation
npm install @palette.dev/webpack-plugin --save-devUsage
Basic Usage
import PalettePlugin from "@palette.dev/webpack-plugin";
export default {
// ...
plugins: [new PalettePlugin({ key: "YOUR_API_KEY" })],
};Next.js Usage
const { withPalette } = require("@palette.dev/webpack-plugin/next");
module.exports = withPalette({
key: process.env.PALETTE_ASSET_KEY,
enableSourceMaps: "CI" in process.env,
include: [".next/static"],
version: process.env.VERCEL_GIT_COMMIT_SHA,
})({
// Next.js config
});Configuration Options
key (required)
Your Palette API key. See https://palette.dev/docs#assets
key: string;enableSourceMaps (optional)
Whether to generate and upload source maps. Defaults to true.
enableSourceMaps?: boolean;Example:
// Only enable source maps in CI environments
enableSourceMaps: "CI" in process.env;version (optional)
Version identifier for your build. Useful for tracking releases.
version?: string;include (optional)
Filepaths to scan recursively for source and source map files.
include?: string[];endpoint (optional)
Custom API endpoint for uploading source maps.
endpoint?: string;dryRun (optional)
Preview mode - don't actually upload source maps.
dryRun?: boolean;silent (optional)
Suppress output. Defaults to !IS_CI.
silent?: boolean;git (optional)
Git metadata for the build.
git?: {
branch?: string;
commit?: string;
};concurrency (optional)
Number of concurrent uploads.
concurrency?: number;