vanilla-extract icon indicating copy to clipboard operation
vanilla-extract copied to clipboard

babel plugin add packageIdentifiers config

Open kingback opened this issue 2 years ago • 0 comments

https://github.com/seek-oss/vanilla-extract/blob/b221532b1e4f5be146a45403ece0e29ebcdf2cf3/packages/babel-plugin/src/index.ts#L236

I'm trying to import style/globalStyle from my custom package, it works in webpack plugin, but babel plugin won't work because it defines packageIdentifiers locally in plugin code.

// my-app
export { style, globalStyle } from '@vanilla-extract/css';

// index.css.ts
import { style, globalStyle } from 'my-app';

// babel.config.js
{
  plugins: [
    ['@vanilla-extract/babel-plugin', {
      packageIdentifiers: ['my-app']
    }]
  ]
}

kingback avatar Mar 01 '22 03:03 kingback