Skip to content

Commit 688357f

Browse files
authored
Inline plugins (tailwindlabs#5455)
* filter out `..Variant` plugins for the core-plugin-list * inline all corePlugins * move preflight css to `./src/css` * remove individual plugins * convert export default object to named exports Note: Normally I would use export function ..., but since we also have some export let xx = createUtilityPlugin in this file, it means that all the `export function` declarations would be hoisted and therefore won't have the correct order anymore. To fix this, I used `export let xx = () => {}` instead of the usual `export function xx() {}` * drop unused `variants()` function This was required for AOT mode. * make a few plugins shorter
1 parent 0002502 commit 688357f

File tree

156 files changed

+2125
-3179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2125
-3179
lines changed

scripts/create-plugin-list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as corePlugins from '../src/plugins'
1+
import * as corePlugins from '../src/corePlugins'
22
import fs from 'fs'
33
import path from 'path'
44

5-
const corePluginList = Object.keys(corePlugins)
5+
let corePluginList = Object.keys(corePlugins).filter((plugin) => !plugin.includes('Variants'))
66

77
fs.writeFileSync(
88
path.join(process.cwd(), 'src', 'corePluginList.js'),

0 commit comments

Comments
 (0)