tailwindcss/tests/fixtures/plugins/example.default.cjs
Jordan Pittman 05d0a6f8d2
Support loading plugins by package / file name (#12087)
* Cleanup test

Strings are going to actually do something now

* Refactor plugin loading in `resolveConfig`

This should keep the same instance of a plugin in use too. Maybe even reduce memory usage?! idk we’ll see

* Support simple plugin configs

* Update types

* Update changelog
2023-09-26 13:21:42 -04:00

11 lines
260 B
JavaScript

const plugin = require('../../../plugin.js')
module.exports.default = plugin.withOptions(function ({ prefix = '' } = {}) {
return function ({ addUtilities }) {
addUtilities({
[`.${prefix}example-1`]: {
color: 'red',
},
})
}
})