Skip to content

Commit a16a043

Browse files
Add change log and improve error messages
1 parent d934c66 commit a16a043

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Added
11+
12+
- Add support for `@config` to load V3 JavaScript config files ([#14239](https://github.com/tailwindlabs/tailwindcss/pull/14239))
13+
1014
### Fixed
1115

1216
- Bring back type exports for the cjs build of `@tailwindcss/postcss`. ([#14256](https://github.com/tailwindlabs/tailwindcss/pull/14256))

packages/tailwindcss/src/compat/config/resolve-config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ function extractConfigs(ctx: ResolutionContext, { config, path }: ConfigFile): v
127127

128128
// Apply configs from presets
129129
if (Array.isArray(config.presets) && config.presets.length === 0) {
130-
throw new Error('The empty preset `[]` is not supported')
130+
throw new Error(
131+
'Error in the config file/plugin/preset. An empty preset (`preset: []`) is not currently supported.',
132+
)
131133
}
132134

133135
for (let preset of config.presets ?? []) {

packages/tailwindcss/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,9 @@ async function parseCss(
342342

343343
for (let file of resolvedConfig.content.files) {
344344
if ('raw' in file) {
345-
throw new Error('raw content is not currently supported')
345+
throw new Error(
346+
`Error in the config file/plugin/preset. The \`content\` key contains a \`raw\` entry:\n\n${JSON.stringify(file, null, 2)}\n\nThis feature is not currently supported.`,
347+
)
346348
}
347349

348350
globs.push(file.pattern)

0 commit comments

Comments
 (0)