Skip to content
This repository was archived by the owner on Jun 14, 2025. It is now read-only.
This repository was archived by the owner on Jun 14, 2025. It is now read-only.

New build system does not compile using keyword correctly #402

@RomainLanz

Description

@RomainLanz

unplugin-typia version

2.0.2

What platform is your computer? Copy the output of npx envinfo --system -npmPackages cleye --binaries

System: OS: macOS 15.3.1 CPU: (10) arm64 Apple M1 Pro Memory: 293.03 MB / 32.00 GB Shell: 4.0.0 - /opt/homebrew/bin/fish

Describe the bug

Hi there, 👋🏻

It seems that the latest version introduced a new build system, but this build system does not handle the using keyword correctly during compilation.

This causes my Vite application to fail with the following error:

failed to load config from /Users/romainlanz/workspace/xxx/vite.config.ts
error when starting dev server:
SyntaxError: Unexpected identifier 'result'
    at compileSourceTextModule (node:internal/modules/esm/utils:344:16)
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:106:18)
    at #translate (node:internal/modules/esm/loader:490:12)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:537:27)

The error is triggered by this line:

using result = transform(id, program, tsSource, options.typia);

Is it expected that the using keyword is not compiled?

Reproduction

I haven’t created a reproduction yet, but I can provide one if needed.

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions