From d1d676e0e5f93ac54de0eec9caf80246b345ca20 Mon Sep 17 00:00:00 2001 From: Eran Grinberg Date: Tue, 1 Aug 2023 23:54:51 +0200 Subject: [PATCH] BUGFIX | Fix entry point to package from monorepo --- README.md | 1 + demo-app-vite/package.json | 3 ++- demo-app-webpack/src/main.js | 2 +- package.json | 10 +++++++++- package/package.json | 2 +- 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4c03bc3..9a93a2f 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ Each option in the `createWebComponent` function has a specific purpose:
Vite Configuration + ## Vite.js Configuration Here's a sample Vite configuration. Comparing with Webpack, Vite.js is able to handle assets files like .css and .scss, and media files, importing them as you do regularly. Vue files will be parsed using oficial [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue) depending of config. If you would like to add plugins for Vite, just install them with your favorite Node package manager. diff --git a/demo-app-vite/package.json b/demo-app-vite/package.json index fb0b741..74819e2 100644 --- a/demo-app-vite/package.json +++ b/demo-app-vite/package.json @@ -19,6 +19,7 @@ "vuex": "^4.1.0" }, "devDependencies": { + "@types/node": "^20.4.5", "@vitejs/plugin-vue": "^4.2.3", "@vue/eslint-config-typescript": "^11.0.3", "autoprefixer": "^10.4.14", @@ -31,4 +32,4 @@ "vite": "^4.3.9", "vue-tsc": "^1.6.5" } -} \ No newline at end of file +} diff --git a/demo-app-webpack/src/main.js b/demo-app-webpack/src/main.js index f086944..a3de90e 100644 --- a/demo-app-webpack/src/main.js +++ b/demo-app-webpack/src/main.js @@ -5,7 +5,7 @@ import { createWebHashHistory, createRouter } from "vue-router"; import { createI18n } from 'vue-i18n'; import { createStore } from 'vuex' import { defaultRoutes} from './main.routes.js' -import {store} from './store/index.js' +import { store } from './store/index.js' import { defineCustomElement as VueDefineCustomElement, h, createApp, getCurrentInstance } from 'vue'; import { createWebComponent } from 'vue-web-component-wrapper'; diff --git a/package.json b/package.json index b898877..19f9f58 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,19 @@ { "name": "vue-web-component-wrapper", - "version": "1.1.0", + "version": "1.1.1", "description": "A Vue 3 plugin that provides a web component wrapper with styles, seamlessly integrating with Vuex, Vue Router, Vue I18n, and supporting Tailwind CSS and Sass styles.", "repository": { "type": "git", "url": "https://github.com/EranGrin/vue3-web-component-wrapper/tree/main/plugin" }, + "main": "package/dist/vue-web-component-wrapper.umd.js", + "module": "package/dist/vue-web-component-wrapper.es.js", + "exports": { + ".": { + "import": "./package/dist/vue-web-component-wrapper.es.js", + "require": "./package/dist/vue-web-component-wrapper.umd.js" + } + }, "scripts": { "build": "pnpm -C package run build", "docs:dev": "vitepress dev docs", diff --git a/package/package.json b/package/package.json index 350a2d5..a86d74d 100644 --- a/package/package.json +++ b/package/package.json @@ -1,6 +1,6 @@ { "name": "vue-web-component-wrapper", - "version": "1.0.6", + "version": "1.1.1", "description": "A Vue 3 plugin that provides a web component wrapper with styles, seamlessly integrating with Vuex, Vue Router, Vue I18n, and supporting Tailwind CSS and Sass styles.", "types": "types.d.ts", "repository": {