From 349af68e6c37886cee2f275d234e43433b6f9f5a Mon Sep 17 00:00:00 2001 From: Dmitry Kuzin Date: Fri, 2 Feb 2024 13:12:03 +0400 Subject: [PATCH] Fix missing README.md in package build --- packages/survey-vue3-ui/package.json | 5 +++-- packages/survey-vue3-ui/vite.config.ts | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/survey-vue3-ui/package.json b/packages/survey-vue3-ui/package.json index 76852a95a1..beea98151c 100644 --- a/packages/survey-vue3-ui/package.json +++ b/packages/survey-vue3-ui/package.json @@ -25,13 +25,14 @@ "@vue/eslint-config-typescript": "^11.0.0", "@vue/test-utils": "latest", "@vue/tsconfig": "^0.1.3", + "commit-and-tag-version": "^11.0.0", + "rollup-plugin-copy": "^3.5.0", "eslint": "^8.22.0", "eslint-plugin-vue": "^9.3.0", "npm-run-all": "^4.1.5", "prettier": "^2.7.1", "rollup-plugin-generate-package-json": "^3.2.0", "survey-core": "../../build/survey-core", - "commit-and-tag-version": "^11.0.0", "typescript": "~4.7.4", "vite": "^3.1.8", "vitest": "~0.32.4", @@ -39,4 +40,4 @@ "vue": "^3.2.41", "vue-tsc": "^1.0.8" } -} +} \ No newline at end of file diff --git a/packages/survey-vue3-ui/vite.config.ts b/packages/survey-vue3-ui/vite.config.ts index d09aee5dd8..71bdb56985 100644 --- a/packages/survey-vue3-ui/vite.config.ts +++ b/packages/survey-vue3-ui/vite.config.ts @@ -2,6 +2,7 @@ import { resolve } from "node:path"; import { fileURLToPath, URL } from "node:url"; import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; +import copy from "rollup-plugin-copy"; import generatePackageJson from "rollup-plugin-generate-package-json"; const json = require("./publish/package.json"); const packageJson = require("./package.json"); @@ -14,7 +15,6 @@ const libraryName = "survey-vue3-ui"; export default defineConfig(({ mode }) => { return { plugins: [vue()], - build: { sourcemap: mode == "development", // Output compiled files to /dist. @@ -33,6 +33,11 @@ export default defineConfig(({ mode }) => { external: ["vue", "survey-core"], plugins: [ + copy({ + targets: [ + { src: "./README.md", dest: "../../build/survey-vue3-ui" }, + ], + }), generatePackageJson({ inputFolder: "publish", outputFolder: "../../build/survey-vue3-ui",