@styils/babel-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@styils/babel-plugin

This is required for sourcemap

Use

// .babelrc
// Make sure to put it first to make the sourcemap more readable
{
  plugins: ['@styils']
}

Custom transform

Refer

Parameter

export interface Options {
  identifier?: {
    styled?: string
    createGlobal?: string
  }
  importPaths?: string | RegExp
  sourceFileName?: string
  sourceRoot?: string
}

identifier

default: { styled:'styled', createGlobal:'createGlobal' }

Used to mark the function name, compile time will lookup based on the function name to confirm if it is the target

importPaths

default: /@styils\/(react|solid)/

Used for styled or createGlobal import paths, and will only be loaded if matched

sourceFileName

default: undefined

Only needed when custom conversion, used to display the target file name

sourceRoot

default: undefined

The file path of SourceFileName

Package Sidebar

Install

npm i @styils/babel-plugin

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

13.7 kB

Total Files

6

Last publish

Collaborators

  • zaire