@emberkit/core 0.2.3 → 0.2.4-alpha.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAsBtE,wBAAgB,kBAAkB,CAAC,WAAW,GAAE,qBAA0B,GAAG,MAAM,CA0FlF;AAk3BD,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vite-plugin/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAoBtE,wBAAgB,kBAAkB,CAAC,WAAW,GAAE,qBAA0B,GAAG,MAAM,CA4FlF;AAk3BD,YAAY,EAAE,qBAAqB,EAAE,YAAY,EAAE,CAAC"}
@@ -4,7 +4,6 @@ import { join, relative, dirname, resolve } from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { compile } from '@mdx-js/mdx';
6
6
  import remarkGfm from 'remark-gfm';
7
- import { compression } from 'vite-plugin-compression2';
8
7
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
8
  const VIRTUAL_EMBERKIT_CONFIG = 'virtual:emberkit-config';
10
9
  const VIRTUAL_EMBERKIT_ROUTES = 'virtual:emberkit-routes';
@@ -21,14 +20,16 @@ export function emberkitVitePlugin(userOptions = {}) {
21
20
  return {
22
21
  name: 'emberkit:vite-plugin',
23
22
  enforce: 'pre',
24
- config() {
23
+ async config() {
25
24
  const pkgRoot = resolve(__dirname, '..', '..');
26
25
  const srcDir = join(pkgRoot, 'src');
27
26
  const plugins = [];
28
27
  if (options.compression?.gzip) {
28
+ const { compression } = await import('vite-plugin-compression2');
29
29
  plugins.push(compression({ algorithm: 'gzip' }));
30
30
  }
31
31
  if (options.compression?.brotli) {
32
+ const { compression } = await import('vite-plugin-compression2');
32
33
  plugins.push(compression({ algorithm: 'brotliCompress' }));
33
34
  }
34
35
  const isWorkspace = existsSync(join(pkgRoot, 'src', 'index.ts'));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emberkit/core",
3
- "version": "0.2.3",
3
+ "version": "0.2.4-alpha.0",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Lightweight TypeScript-first JSX framework core",
@@ -49,7 +49,8 @@
49
49
  "dependencies": {
50
50
  "@mdx-js/mdx": "^3.1.1",
51
51
  "remark-gfm": "^4.0.0",
52
- "vite": "^6.0.0"
52
+ "vite": "^6.0.0",
53
+ "vite-plugin-compression2": "^2.5.3"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@eslint/js": "^10.0.1",
@@ -59,7 +60,6 @@
59
60
  "eslint-plugin-perfectionist": "^5.9.0",
60
61
  "jsdom": "^29.1.1",
61
62
  "typescript-eslint": "^8.59.3",
62
- "vite-plugin-compression2": "^2.5.3",
63
63
  "vitest": "^3.0.0"
64
64
  },
65
65
  "scripts": {