Skip to main content

Webpack Plugin

Install

npm install @palette.dev/webpack-plugin

Usage

Get your asset key at https://palette.dev/[your-username]/[your-project]/settings

webpack.config.js
const PalettePlugin = require("@palette.dev/webpack-plugin");

module.exports = {
// ...
plugins: [
new PalettePlugin({
key: process.env.PALETTE_ASSET_KEY,
// Only upload source maps in CI
enableSourceMaps: "CI" in process.env,
}),
],
};

API

PropertyDescriptionTypeDefault
keyPalette asset keyboolean(required)
versionVersion of your appbooleangit commit hash
releaseMark version as release (see the release docs)booleanif the current git branch is main or master or false
enableSourceMapsEnable source map uploadsbooleantrue
includeDirectories to search for source mapsstring[]
© 2024 Redraw, Inc.