@component-hook/create-app 1.0.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template-vue/src/__tests__/e2e/IndexPage.spec.ts +1 -1
- package/template-vue/src/__tests__/setup/unit-test.ts +1 -1
- package/template-vue/src/__tests__/unit/components/indexPage/HelloWorld.test.ts +3 -3
- package/template-vue/src/__tests__/unit/render/index.ts +4 -4
- package/template-vue/src/main.ts +5 -5
- package/template-vue/vite.config.ts +4 -4
- package/template-vue/vitest.config.ts +1 -1
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { screen } from '@testing-library/vue';
|
|
2
1
|
import userEvent from '@testing-library/user-event';
|
|
3
|
-
import
|
|
2
|
+
import { screen } from '@testing-library/vue';
|
|
4
3
|
import { renderComponent } from '@/__tests__/unit/render';
|
|
5
|
-
import
|
|
4
|
+
import HelloWorld from '@/components/indexPage/HelloWorld.vue';
|
|
6
5
|
import i18n from '@/plugins/i18n';
|
|
6
|
+
import { useConfigStore } from '@/stores';
|
|
7
7
|
|
|
8
8
|
describe('HelloWorld component', () => {
|
|
9
9
|
const { t } = i18n.global;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { Component } from 'vue';
|
|
2
|
-
import { createRouter, createMemoryHistory } from 'vue-router';
|
|
3
1
|
import { render } from '@testing-library/vue';
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import { createPinia, setActivePinia } from 'pinia';
|
|
3
|
+
import { createMemoryHistory, createRouter } from 'vue-router';
|
|
6
4
|
import i18n from '@/plugins/i18n';
|
|
7
5
|
import { routes } from '@/router';
|
|
6
|
+
import type { RenderOptions } from '@testing-library/vue/types';
|
|
7
|
+
import type { Component } from 'vue';
|
|
8
8
|
|
|
9
9
|
interface RenderComponentOptions extends RenderOptions<unknown> {
|
|
10
10
|
provide?: Record<PropertyKey, unknown>;
|
package/template-vue/src/main.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { createApp } from 'vue';
|
|
2
1
|
import { createPinia } from 'pinia';
|
|
3
2
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
|
4
|
-
import '
|
|
3
|
+
import { createApp } from 'vue';
|
|
4
|
+
import i18NPlugin from '@/plugins/i18n';
|
|
5
5
|
|
|
6
|
+
import router from '@/router';
|
|
7
|
+
import App from './App.vue';
|
|
8
|
+
import 'virtual:svg-icons-register';
|
|
6
9
|
import '@/styles/tailwind.postcss';
|
|
7
10
|
import '@/styles/index.postcss';
|
|
8
|
-
import App from './App.vue';
|
|
9
|
-
import router from '@/router';
|
|
10
|
-
import i18NPlugin from '@/plugins/i18n';
|
|
11
11
|
|
|
12
12
|
if (process.env.NODE_ENV === 'mockServiceWorker') {
|
|
13
13
|
const { worker } = await import('@/mocks/browser');
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { fileURLToPath, URL } from 'node:url';
|
|
2
1
|
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import {
|
|
2
|
+
import { fileURLToPath, URL } from 'node:url';
|
|
3
|
+
import vueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
|
|
4
4
|
import vue from '@vitejs/plugin-vue';
|
|
5
|
+
import { visualizer } from 'rollup-plugin-visualizer';
|
|
5
6
|
import Components from 'unplugin-vue-components/vite';
|
|
6
|
-
import
|
|
7
|
+
import { defineConfig } from 'vite';
|
|
7
8
|
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
|
|
8
|
-
import { visualizer } from 'rollup-plugin-visualizer';
|
|
9
9
|
import packageJson from './package.json' with { type: 'json' };
|
|
10
10
|
|
|
11
11
|
process.env.VITE_APP_VERSION = packageJson.version;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="vitest" />
|
|
2
2
|
import { fileURLToPath, URL } from 'node:url';
|
|
3
|
-
import {
|
|
3
|
+
import { defineConfig, mergeConfig } from 'vitest/config';
|
|
4
4
|
import viteConfig from './vite.config';
|
|
5
5
|
|
|
6
6
|
export default mergeConfig(
|