From b399e8db90c2b62fef875194409e7b25e623ff10 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 10 Dec 2021 11:25:10 +0100 Subject: [PATCH] Add `default` interop to public available functions (#6348) * add `default` interop to public available functions * update changelog --- CHANGELOG.md | 3 ++- colors.js | 3 ++- defaultConfig.js | 3 ++- defaultTheme.js | 3 ++- plugin.js | 3 ++- resolveConfig.js | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9c5be047..fa555db9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed -- Ensure complex variants with multiple classes work [#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311) +- Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311)) +- Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348)) ## [3.0.0] - 2021-12-09 diff --git a/colors.js b/colors.js index 90e56afec..c6f914958 100644 --- a/colors.js +++ b/colors.js @@ -1 +1,2 @@ -module.exports = require('./lib/public/colors').default +let colors = require('./lib/public/colors') +module.exports = (colors.__esModule ? colors : { default: colors }).default diff --git a/defaultConfig.js b/defaultConfig.js index 2e5ac68d5..7b635875d 100644 --- a/defaultConfig.js +++ b/defaultConfig.js @@ -1 +1,2 @@ -module.exports = require('./lib/public/default-config').default +let defaultConfig = require('./lib/public/default-config') +module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default diff --git a/defaultTheme.js b/defaultTheme.js index 491e64375..991526d7b 100644 --- a/defaultTheme.js +++ b/defaultTheme.js @@ -1 +1,2 @@ -module.exports = require('./lib/public/default-theme').default +let defaultTheme = require('./lib/public/default-theme') +module.exports = (defaultTheme.__esModule ? defaultTheme : { default: defaultTheme }).default diff --git a/plugin.js b/plugin.js index 7c2db080d..7ed976d22 100644 --- a/plugin.js +++ b/plugin.js @@ -1 +1,2 @@ -module.exports = require('./lib/public/create-plugin').default +let createPlugin = require('./lib/public/create-plugin') +module.exports = (createPlugin.__esModule ? createPlugin : { default: createPlugin }).default diff --git a/resolveConfig.js b/resolveConfig.js index 222e4ed4c..551f044b1 100644 --- a/resolveConfig.js +++ b/resolveConfig.js @@ -1 +1,2 @@ -module.exports = require('./lib/public/resolve-config').default +let resolveConfig = require('./lib/public/resolve-config') +module.exports = (resolveConfig.__esModule ? resolveConfig : { default: resolveConfig }).default