|
| 1 | +import type { QwikVitePlugin } from '@builder.io/qwik/optimizer'; |
1 | 2 | import swRegister from '@qwik-city-sw-register-build';
|
2 |
| -import { createMdxTransformer, type MdxTransform } from '../markdown/mdx'; |
3 |
| -import { basename, join, resolve, extname } from 'node:path'; |
4 |
| -import type { Plugin, PluginOption, UserConfig, Rollup } from 'vite'; |
| 3 | +import fs from 'node:fs'; |
| 4 | +import { basename, extname, join, resolve } from 'node:path'; |
| 5 | +import type { Plugin, PluginOption, Rollup, UserConfig } from 'vite'; |
5 | 6 | import { loadEnv } from 'vite';
|
6 |
| -import { generateQwikCityPlan } from '../runtime-generation/generate-qwik-city-plan'; |
7 |
| -import type { BuildContext } from '../types'; |
8 |
| -import { createBuildContext, resetBuildContext } from '../context'; |
| 7 | +import { |
| 8 | + NOT_FOUND_PATHS_ID, |
| 9 | + RESOLVED_NOT_FOUND_PATHS_ID, |
| 10 | + RESOLVED_STATIC_PATHS_ID, |
| 11 | + STATIC_PATHS_ID, |
| 12 | +} from '../../adapters/shared/vite'; |
| 13 | +import { postBuild } from '../../adapters/shared/vite/post-build'; |
| 14 | +import { patchGlobalThis } from '../../middleware/node/node-fetch'; |
9 | 15 | import { isMenuFileName, normalizePath, removeExtension } from '../../utils/fs';
|
10 |
| -import { validatePlugin } from './validate-plugin'; |
11 |
| -import type { QwikCityPluginApi, QwikCityVitePluginOptions } from './types'; |
12 | 16 | import { build } from '../build';
|
13 |
| -import { ssrDevMiddleware, staticDistMiddleware } from './dev-server'; |
| 17 | +import { createBuildContext, resetBuildContext } from '../context'; |
| 18 | +import { createMdxTransformer, type MdxTransform } from '../markdown/mdx'; |
14 | 19 | import { transformMenu } from '../markdown/menu';
|
15 | 20 | import { generateQwikCityEntries } from '../runtime-generation/generate-entries';
|
16 |
| -import { patchGlobalThis } from '../../middleware/node/node-fetch'; |
17 |
| -import type { QwikVitePlugin } from '@builder.io/qwik/optimizer'; |
18 |
| -import fs from 'node:fs'; |
| 21 | +import { generateQwikCityPlan } from '../runtime-generation/generate-qwik-city-plan'; |
19 | 22 | import {
|
20 | 23 | generateServiceWorkerRegister,
|
21 | 24 | prependManifestToServiceWorker,
|
22 | 25 | } from '../runtime-generation/generate-service-worker';
|
23 |
| -import { |
24 |
| - NOT_FOUND_PATHS_ID, |
25 |
| - RESOLVED_NOT_FOUND_PATHS_ID, |
26 |
| - RESOLVED_STATIC_PATHS_ID, |
27 |
| - STATIC_PATHS_ID, |
28 |
| -} from '../../adapters/shared/vite'; |
29 |
| -import { postBuild } from '../../adapters/shared/vite/post-build'; |
| 26 | +import type { BuildContext } from '../types'; |
| 27 | +import { ssrDevMiddleware, staticDistMiddleware } from './dev-server'; |
30 | 28 | import { imagePlugin } from './image-jsx';
|
| 29 | +import type { QwikCityPluginApi, QwikCityVitePluginOptions } from './types'; |
| 30 | +import { validatePlugin } from './validate-plugin'; |
31 | 31 |
|
32 | 32 | /** @public */
|
33 | 33 | export function qwikCity(userOpts?: QwikCityVitePluginOptions): PluginOption[] {
|
|
0 commit comments