Skip to content

Commit

Permalink
seems to be an incompatibility with yarn pnp and vite-plugin-dts
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBrax committed Jun 1, 2023
1 parent c49bdd1 commit acfb82c
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 68 deletions.
131 changes: 66 additions & 65 deletions package.json
@@ -1,66 +1,67 @@
{
"name": "twitch-vod-chat",
"version": "2.1.1",
"private": true,
"description": "http://vod.dongers.net/player.html",
"author": "",
"scripts": {
"lint": "vue-tsc --noEmit",
"serve": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"buildlib": "vue-tsc --noEmit && vite build --config vite.config.lib.ts",
"buildlibtypes": "tsc ./lib/main.ts --declaration --emitDeclarationOnly --esModuleInterop --outDir dist-lib"
},
"type": "module",
"main": "./dist-lib/twitch-vod-chat.cjs",
"module": "./dist-lib/twitch-vod-chat.js",
"exports": {
".": {
"import": "./dist-lib/twitch-vod-chat.js",
"require": "./dist-lib/twitch-vod-chat.cjs"
}
},
"dependencies": {
"core-js": "^3.30.2",
"eslint-plugin-deprecation": "^1.3.2",
"vue": "^3.3.4"
},
"devDependencies": {
"@tsconfig/node18": "^2.0.1",
"@types/youtube-player": "^5.5.5",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/test-utils": "^2.3.2",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.14.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"sass": "^1.62.1",
"typescript": "^5.0.4",
"vite": "^4.3.9",
"vite-plugin-dts": "^2.3.0",
"vue-tsc": "^1.6.5"
},
"_id": "twitch-vod-chat@1.3.1-a",
"bugs": {
"url": "https://github.com/MrBrax/twitch-vod-chat/issues"
},
"directories": {
"example": "examples"
},
"homepage": "https://github.com/MrBrax/twitch-vod-chat#readme",
"license": "ISC",
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/MrBrax/twitch-vod-chat.git"
},
"packageManager": "yarn@3.5.1"
}
"name": "twitch-vod-chat",
"version": "2.1.1",
"private": true,
"description": "http://vod.dongers.net/player.html",
"author": "",
"scripts": {
"lint": "vue-tsc --noEmit",
"serve": "vite",
"build": "run-p type-check build-only",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"buildlib": "run-p type-check && vite build --config vite.config.lib.ts && buildlibtypes",
"buildlibtypes": "yarn vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./types"
},
"type": "module",
"main": "./dist-lib/twitch-vod-chat.cjs",
"module": "./dist-lib/twitch-vod-chat.js",
"exports": {
".": {
"import": "./dist-lib/twitch-vod-chat.js",
"require": "./dist-lib/twitch-vod-chat.cjs"
}
},
"dependencies": {
"core-js": "^3.30.2",
"eslint-plugin-deprecation": "^1.3.2",
"vue": "^3.3.4"
},
"devDependencies": {
"@tsconfig/node18": "^2.0.1",
"@types/youtube-player": "^5.5.5",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/test-utils": "^2.3.2",
"@vue/tsconfig": "^0.4.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.14.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"sass": "^1.62.1",
"typescript": "^5.0.4",
"vite": "^4.3.9",
"vite-plugin-dts": "^2.3.0",
"vue-tsc": "^1.6.5"
},
"_id": "twitch-vod-chat@1.3.1-a",
"bugs": {
"url": "https://github.com/MrBrax/twitch-vod-chat/issues"
},
"directories": {
"example": "examples"
},
"homepage": "https://github.com/MrBrax/twitch-vod-chat#readme",
"license": "ISC",
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/MrBrax/twitch-vod-chat.git"
},
"packageManager": "yarn@3.5.1",
"types": "./dist-lib/twitch-vod-chat.d.ts"
}
2 changes: 1 addition & 1 deletion src/store/index.ts
@@ -1,5 +1,5 @@
import type { VODPlayerSettings } from "@/defs";
import { reactive, type Ref, ref, watch } from "vue";
import { reactive } from "vue";

interface StoreType {
minimal: boolean;
Expand Down
11 changes: 9 additions & 2 deletions vite.config.lib.ts
Expand Up @@ -3,19 +3,26 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import dts from 'vite-plugin-dts'
import { fileURLToPath, URL } from 'node:url'

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue(),
dts({
entryRoot: path.resolve(__dirname),
// insertTypesEntry: true,
copyDtsFiles: true,
outputDir: 'dist-lib',
staticImport: true,
skipDiagnostics: false,
insertTypesEntry: true,
tsConfigFilePath: path.resolve(__dirname, 'tsconfig.app.json'),
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'@': fileURLToPath(new URL('./src', import.meta.url))
},
},
build: {
Expand All @@ -26,7 +33,7 @@ export default defineConfig({
entry: path.resolve(__dirname, 'src/lib.ts'),
name: 'twitch-vod-chat',
fileName: 'twitch-vod-chat',
formats: ['es', 'cjs'],
// formats: ['es', 'cjs'],
},
rollupOptions: {
external: ['vue'],
Expand Down

0 comments on commit acfb82c

Please sign in to comment.