From d72dc519e104b7d79c656a0f1c16af5b3a5f965b Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 10 Dec 2021 11:13:18 +0100 Subject: [PATCH 1/2] add `default` interop to public available functions --- colors.js | 3 ++- defaultConfig.js | 3 ++- defaultTheme.js | 3 ++- plugin.js | 3 ++- resolveConfig.js | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/colors.js b/colors.js index 90e56afecc55..c6f914958841 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 2e5ac68d5160..7b635875d255 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 491e64375b92..991526d7bf2f 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 7c2db080d931..7ed976d22477 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 222e4ed4c3fb..551f044b120e 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 From 3a2fe5fc4980eca1aba8b726c50f32812335d95a Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Fri, 10 Dec 2021 11:18:30 +0100 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9c5be0476ec..fa555db9f265 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