Skip to content

Commit 9877499

Browse files
JohnMcLearclaude
andcommitted
fix: use plain imports instead of 'import type' for microbundle compat
microbundle's babel parser doesn't accept 'import type' syntax either. Use plain value imports — TypeScript treats them as type-only when the binding is used only in type position, and the bundler strips them. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e6aeb22 commit 9877499

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import Ajv from 'ajv/dist/jtd';
2-
import type {JTDDataType} from 'ajv/dist/jtd';
3-
import {isContext, logger, setLogger} from './common';
4-
import type {Awaitable, Context, Logger} from './common';
1+
import Ajv, {JTDDataType} from 'ajv/dist/jtd';
2+
import {isContext, logger, setLogger, Awaitable, Context, Logger} from './common';
53
import * as mariadb from './mariadb';
64
import * as javascript from './javascript';
75

src/javascript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type {JTDDataType} from 'ajv/dist/jtd';
2-
import type {Context, Optional} from './common';
1+
import {JTDDataType} from 'ajv/dist/jtd';
2+
import {Context, Optional} from './common';
33

44
export const schema = {
55
properties: {

src/mariadb.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import type {JTDDataType} from 'ajv/dist/jtd';
2-
import {logger} from './common';
3-
import type {Context} from './common';
4-
import {createPool} from 'mariadb';
5-
import type {Pool, PoolConfig} from 'mariadb';
1+
import {JTDDataType} from 'ajv/dist/jtd';
2+
import {logger, Context} from './common';
3+
import {createPool, Pool, PoolConfig} from 'mariadb';
64

75
export const schema = {
86
properties: {

0 commit comments

Comments
 (0)