{"library":"powerbi-visuals-webpack-plugin","title":"powerbi-visuals-webpack-plugin","description":"Webpack plugin for building Power BI custom visuals. Current stable version is 5.0.1, released on an ongoing cadence under Microsoft. Key differentiators vs powerbi-visuals-tools: it integrates with webpack, provides developer server assets and .pbiviz packaging, supports localization, certification auditing, and removal of forbidden network calls for certified visuals. Requires Node >=18.0.0 and webpack 5. The plugin generates GUID, handles pbiviz.json, and enforces API version compatibility.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install powerbi-visuals-webpack-plugin"],"cli":null},"imports":["import { PowerBICustomVisualsWebpackPlugin } from 'powerbi-visuals-webpack-plugin'","import { LocalizationLoader } from 'powerbi-visuals-webpack-plugin'","const { PowerBICustomVisualsWebpackPlugin } = require('powerbi-visuals-webpack-plugin')"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const path = require('path');\nconst { PowerBICustomVisualsWebpackPlugin } = require('powerbi-visuals-webpack-plugin');\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin');\n\nmodule.exports = {\n  entry: './src/visual.ts',\n  output: { path: path.resolve(__dirname, 'dist'), filename: 'visual.js' },\n  resolve: { extensions: ['.ts', '.js'] },\n  module: {\n    rules: [\n      { test: /\\.ts$/, use: 'ts-loader', exclude: /node_modules/ },\n      { test: /\\.less$/, use: [MiniCssExtractPlugin.loader, 'css-loader', 'less-loader'] },\n      { test: /\\.json$/, type: 'json' }\n    ]\n  },\n  plugins: [\n    new PowerBICustomVisualsWebpackPlugin({\n      visual: {\n        name: 'MyVisual',\n        displayName: 'My Visual',\n        guid: 'myVisual123ABC',\n        visualClassName: 'Visual',\n        version: '1.0.0',\n        description: 'A sample custom visual',\n        supportUrl: 'https://example.com'\n      },\n      author: 'Author',\n      apiVersion: '5.3.0',\n      capabilities: {},\n      iconImage: 'data:image/png;base64,...',\n      devMode: true,\n      packageOutPath: path.resolve(__dirname, 'dist'),\n      generatePbiviz: true\n    }),\n    new MiniCssExtractPlugin({ filename: 'visual.css' })\n  ],\n  devServer: {\n    https: true,\n    port: 8080\n  }\n};","lang":"javascript","description":"Configures webpack with PowerBICustomVisualsWebpackPlugin for a Power BI custom visual, including TypeScript, Less, CSS extraction, and devServer.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}