From 41f29767db82053fb4bb6ceb086c8ff7c3b73a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 10 Feb 2026 15:18:11 +0100 Subject: [PATCH] :bug: Fix configuration of poc-tokens-plugin (#8314) * :bug: Fix configuration of poc-tokens-plugin * :paperclip: Add missing changes on poc-tokens-pligin tsconfig --------- Co-authored-by: Andrey Antukh --- plugins/angular.json | 70 ++++++++++++++++++++ plugins/apps/poc-tokens-plugin/package.json | 6 +- plugins/apps/poc-tokens-plugin/tsconfig.json | 4 +- plugins/package.json | 2 +- 4 files changed, 77 insertions(+), 5 deletions(-) diff --git a/plugins/angular.json b/plugins/angular.json index 2aa33aa16c..4f6f8b0c1c 100644 --- a/plugins/angular.json +++ b/plugins/angular.json @@ -485,6 +485,76 @@ "defaultConfiguration": "development" } } + }, + "poc-tokens-plugin": { + "projectType": "application", + "root": "apps/poc-tokens-plugin", + "sourceRoot": "apps/poc-tokens-plugin/src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:application", + "options": { + "outputPath": "dist/apps/poc-tokens-plugin", + "index": "apps/poc-tokens-plugin/src/index.html", + "browser": "apps/poc-tokens-plugin/src/main.ts", + "polyfills": ["zone.js"], + "tsConfig": "apps/poc-tokens-plugin/tsconfig.app.json", + "assets": [ + "apps/poc-tokens-plugin/src/_headers", + "apps/poc-tokens-plugin/src/favicon.ico", + "apps/poc-tokens-plugin/src/assets" + ], + "styles": [ + "libs/plugins-styles/src/lib/styles.css", + "apps/poc-tokens-plugin/src/styles.css" + ], + "scripts": [], + "optimization": { + "scripts": true, + "styles": true, + "fonts": false + } + }, + "configurations": { + "production": { + "budgets": [ + { + "type": "initial", + "maximumWarning": "500kb", + "maximumError": "1mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "2kb", + "maximumError": "4kb" + } + ], + "outputHashing": "all" + }, + "development": { + "optimization": false, + "extractLicenses": false, + "sourceMap": true + } + }, + "defaultConfiguration": "production" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "configurations": { + "production": { + "buildTarget": "poc-tokens-plugin:build:production" + }, + "development": { + "buildTarget": "poc-tokens-plugin:build:development", + "host": "0.0.0.0", + "port": 4202 + } + }, + "defaultConfiguration": "development" + } + } } }, "cli": { diff --git a/plugins/apps/poc-tokens-plugin/package.json b/plugins/apps/poc-tokens-plugin/package.json index 292eca0ea9..df35a092ca 100644 --- a/plugins/apps/poc-tokens-plugin/package.json +++ b/plugins/apps/poc-tokens-plugin/package.json @@ -4,9 +4,9 @@ "private": true, "type": "module", "scripts": { - "build": "ng build colors-to-tokens-plugin", - "build:dev": "ng build colors-to-tokens-plugin --configuration development", - "serve": "ng serve colors-to-tokens-plugin", + "build": "ng build poc-tokens-plugin", + "build:dev": "ng build poc-tokens-plugin --configuration development", + "serve": "ng serve poc-tokens-plugin", "lint": "eslint .", "test": "exit 0" } diff --git a/plugins/apps/poc-tokens-plugin/tsconfig.json b/plugins/apps/poc-tokens-plugin/tsconfig.json index 4c48587cfe..61171de3b7 100644 --- a/plugins/apps/poc-tokens-plugin/tsconfig.json +++ b/plugins/apps/poc-tokens-plugin/tsconfig.json @@ -8,7 +8,9 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "moduleResolution": "bundler", + "module": "preserve" }, "files": [], "include": [], diff --git a/plugins/package.json b/plugins/package.json index 053666f4c2..e7427ae5e3 100644 --- a/plugins/package.json +++ b/plugins/package.json @@ -16,7 +16,7 @@ "start:plugin:table": "pnpm --filter table-plugin serve", "start:plugin:renamelayers": "pnpm --filter rename-layers-plugin serve", "start:plugin:colors-to-tokens": "pnpm --filter colors-to-tokens-plugin serve", - "start:plugin:poc-tokens": "pnpm --filter poc-tokens serve", + "start:plugin:poc-tokens": "pnpm --filter poc-tokens-plugin serve", "build:runtime": "pnpm --filter @penpot/plugins-runtime build", "build:plugins": "pnpm --filter './apps/*-plugin' --filter '!poc-state-plugin' build", "build:styles-example": "pnpm --filter example-styles build",