Skip to content

DTS Bundling not exporting previously available interfaces and types #1115

@AndrewLeedham

Description

@AndrewLeedham

Describe the bug

Since @vanilla-extract/[email protected] I cannot compile Vanilla Extract types with tsc. The issue seem to step from the bundling of dts files, as interfaces like AllQueries are no longer exported, so the TypeScript compiler throws the following error:

Exported variable 'exampleRecipe' has or is using name 'AllQueries' from external module "file:///node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs" but cannot be named.

This happens when composing types like StyleRule which are exported but use interfaces that aren't.

Reproduction

https://www.typescriptlang.org/play?ts=5.1.3#code/JYWwDg9gTgLgBAbzgZRgTwDYFMBKBXbOAXzgDMoIQ4ByAAQDcBDAO2Aw0YFosAPGKRgGMYAekEBncdQDcAKFmhIsRHChZBwMFmJkKVOk1bsuvfkNFqNWqXNmCIzcfFIRBecQC4U6bPmwBtanEsbGFoKQBdOABeRFk4GgAyDxc3cU56YHFgACNsai8EeIS4ewxoL2o8vCxqYqJZBtleJXh7R3heRnBfdU1tWMt+gAoihJzGYMLihLKKmjUAE2oAGnq1hKYoYBYYTziSuEWssA40acPx8sEAawvLhOPxU8ZzmjzXG9WZkqINy+owGYGCBWE4H1uBQODyOJzOlSBIOYYIhXx+CT+6LIrnc9wewVCMHCeJhADpyal3P8Hg0aT9MRjGgBKaRAA

System Info

I cannot run that in the TS playground, but I am seeing the issue locally with:

  System:
    OS: macOS 13.3.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 267.59 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.6.3 - ~/.nvm/versions/node/v16.18.0/bin/npm
  Browsers:
    Safari: 16.4
  npmPackages:
    @vanilla-extract/esbuild-plugin: 2.2.2 => 2.2.2 
    @vanilla-extract/vite-plugin: 3.8.2 => 3.8.2 
    esbuild: 0.17.19 => 0.17.19 
    rollup: 2.79.1 => 2.79.1 
    vite: 3.2.7 => 3.2.7

Used Package Manager

yarn

Logs

Exported variable 'exampleRecipe' has or is using name 'AllQueries' from external module "file:///node_modules/@vanilla-extract/css/dist/vanilla-extract-css.cjs" but cannot be named.

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions