Skip to content

Commit

Permalink
chore: extract build fragments out of package
Browse files Browse the repository at this point in the history
- temp workaround for vitejs/vite#9202
  • Loading branch information
lukashroch committed Jul 19, 2022
1 parent 0565431 commit bc564b4
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 125 deletions.
2 changes: 1 addition & 1 deletion apps/admin/package.json
Expand Up @@ -58,7 +58,7 @@
"prettier": "^2.7.1",
"sass": "~1.32.13",
"unplugin-vue-components": "^0.21.1",
"vite": "3.0.0",
"vite": "^3.0.2",
"vite-plugin-fonts": "^0.5.0",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.12.3",
Expand Down
3 changes: 1 addition & 2 deletions apps/admin/vite.config.ts
Expand Up @@ -11,8 +11,7 @@ import { createHtmlPlugin } from 'vite-plugin-html';
import { VitePWA } from 'vite-plugin-pwa';

import pkg from './package.json';
import { isCaptchaProvider } from '../../packages/common/src/types';
import { resolveCaptchaScript } from '../../packages/ui/src/captcha/util';
import { isCaptchaProvider, resolveCaptchaScript } from '../../packages/ui-build';

// Set build info for application
process.env.VITE_APP_BUILD_VERSION = pkg.version;
Expand Down
2 changes: 1 addition & 1 deletion apps/portal/package.json
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@fortawesome/fontawesome-free": "^6.1.1",
"@popperjs/core": "^2.11.5",
"bootstrap": "^5.1.3",
"bootstrap": "^5.2.0",
"dotenv": "^16.0.1",
"dotenv-expand": "^8.0.3",
"express": "^4.18.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/survey/package.json
Expand Up @@ -52,7 +52,7 @@
"sass": "~1.32.13",
"typescript": "^4.7.4",
"unplugin-vue-components": "^0.21.1",
"vite": "3.0.0",
"vite": "^3.0.2",
"vite-plugin-fonts": "^0.5.0",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.12.3",
Expand Down
3 changes: 1 addition & 2 deletions apps/survey/vite.config.ts
Expand Up @@ -11,8 +11,7 @@ import { createHtmlPlugin } from 'vite-plugin-html';
import { VitePWA } from 'vite-plugin-pwa';

import pkg from './package.json';
import { isCaptchaProvider } from '../../packages/common/src/types';
import { resolveCaptchaScript } from '../../packages/ui/src/captcha/util';
import { isCaptchaProvider, resolveCaptchaScript } from '../../packages/ui-build';

// Set build info for application
process.env.VITE_APP_BUILD_VERSION = pkg.version;
Expand Down
6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -59,15 +59,15 @@
"@jest/types": "^28.1.3",
"@types/jest": "^28.1.6",
"@types/node": "^17.0.45",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.30.7",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"eslint": "^8.20.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-define-config": "^1.5.1",
"eslint-import-resolver-typescript": "^3.2.7",
"eslint-import-resolver-typescript": "^3.3.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.2.0",
Expand Down
@@ -1,4 +1,9 @@
import type { CaptchaProvider } from '@intake24/common/types';
export const captchaProviders = ['h-captcha', 're-captcha'] as const;

export type CaptchaProvider = typeof captchaProviders[number];

export const isCaptchaProvider = (provider: any): provider is CaptchaProvider =>
captchaProviders.includes(provider);

export const resolveCaptchaScript = (provider: CaptchaProvider) => {
switch (provider) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Expand Up @@ -35,7 +35,7 @@
"devDependencies": {
"@types/lodash": "^4.14.182",
"@types/node": "^17.0.45",
"vite": "3.0.0",
"vite": "^3.0.2",
"vite-plugin-pwa": "^0.12.3"
},
"bundledDependencies": [
Expand Down

0 comments on commit bc564b4

Please sign in to comment.