@styils/babel-plugin
v1.1.1
Published
babel plugin styils
Downloads
4
Maintainers
Readme
@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
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