Skip to content

svelte package regression for resolving imports #13436

@zhihengGet

Description

@zhihengGet

Describe the bug

this PR 's regex broke svelte package for me, it worked 2.3.7 https://github.com/sveltejs/kit/pull/13351/files

The new regex does not work for special char, this regex seem to work (thanks chatGPT), i also verified locally

/\b(import|export)\s+([\s\S]*?)\s+from\s+(['"])([^\r\n]+?)\3/g

import {$created as dfjsdljf } from "@test"
import { ... ,

 type ... ,

}  from  "@test/*"

Reproduction

  • should be easy to reproduce

Logs

-

System Info

-

Severity

serious, but I can work around it

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions