mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Add custom plugins tests (#5383)
* add tests for the plugin API * make plugin invocation optional It could be that an object has been passed as a plugin, in that case we will use the `handler` function from the object. If it doesn't exist, then we will only take the `config` section out of it.
This commit is contained in:
parent
c315db5f15
commit
2dac5bb569
@ -499,7 +499,7 @@ function registerPlugins(plugins, context) {
|
||||
pluginItem(pluginApi)
|
||||
}
|
||||
} else {
|
||||
plugin(pluginApi)
|
||||
plugin?.(pluginApi)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1894
tests/custom-plugins.test.js
Normal file
1894
tests/custom-plugins.test.js
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user