Skip to content

Commit a8cd263

Browse files
Merge pull request #187 from studiometa/feature/tailwindcss-v4
[Feature] Tailwind CSS v4 & updates
2 parents 9050051 + 988de08 commit a8cd263

File tree

9 files changed

+1122
-1820
lines changed

9 files changed

+1122
-1820
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
### Changed
10+
11+
- **@studiometa/webpack-config:** upgrade dependencies ([#187](https://github.com/studiometa/webpack-config/pull/187), [5dc51d4](https://github.com/studiometa/webpack-config/commit/5dc51d4))
12+
- **@studiometa/webpack-config-preset-prototyping:** upgrade dependencies ([#187](https://github.com/studiometa/webpack-config/pull/187), [37bbf3d](https://github.com/studiometa/webpack-config/commit/37bbf3d))
13+
- **@studiometa/webpack-config-preset-tailwindcss-4:** upgrade tailwindcss to ^4.0.0 ([#187](https://github.com/studiometa/webpack-config/pull/187), [72c600c](https://github.com/studiometa/webpack-config/commit/72c600c))
14+
15+
### Removed
16+
17+
- **@studiometa/webpack-config:** delete obsolete tailwind-config-viewer ([#187](https://github.com/studiometa/webpack-config/pull/187), [abff137](https://github.com/studiometa/webpack-config/commit/abff137))
18+
919
## [v6.3.2](https://github.com/studiometa/webpack-config/compare/6.3.1..6.3.2) (2024-12-10)
1020

1121
### Changed

package-lock.json

+1,097-1,724
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"postversion": "node scripts/update-composer-version.mjs"
1616
},
1717
"devDependencies": {
18-
"@studiometa/eslint-config": "4.1.0",
18+
"@studiometa/eslint-config": "4.2.0",
1919
"@studiometa/prettier-config": "4.1.0",
20-
"eslint": "9.16.0",
20+
"eslint": "9.18.0",
2121
"prettier": "3.4.2"
2222
}
2323
}

packages/demo/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
"remark": "15.0.1"
1616
},
1717
"dependencies": {
18-
"@studiometa/js-toolkit": "^2.12.1",
18+
"@studiometa/js-toolkit": "^3.0.0",
1919
"@studiometa/ui": "^0.2.54",
20-
"tailwindcss": "^4.0.0-beta.6",
20+
"tailwindcss": "^4.0.0",
2121
"vue": "^3.5.13"
2222
},
2323
"imports": {

packages/preset-prototyping/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"change-case": "5.4.4",
3737
"collect.js": "^4.36.1",
3838
"filemanager-webpack-plugin": "^8.0.0",
39-
"glob": "^11.0.0",
39+
"glob": "^11.0.1",
4040
"html-escaper": "^3.0.3",
4141
"html-webpack-harddisk-plugin": "^2.0.0",
4242
"html-webpack-plugin": "^5.6.3",

packages/preset-tailwindcss-4/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
},
2828
"homepage": "https://github.com/studiometa/webpack-config#readme",
2929
"peerDependencies": {
30-
"tailwindcss": "^4.0.0-beta.6"
30+
"tailwindcss": "^4.0.0"
3131
},
3232
"dependencies": {
33-
"@tailwindcss/postcss": "^4.0.0-beta.6"
33+
"@tailwindcss/postcss": "^4.0.0"
3434
}
3535
}

packages/webpack-config/package.json

+7-8
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,26 @@
4949
"autoprefixer": "^10.4.20",
5050
"browser-sync": "^3.0.3",
5151
"cac": "^6.7.14",
52-
"chalk": "^5.3.0",
52+
"chalk": "^5.4.1",
5353
"common-dir": "^3.0.1",
5454
"css-minimizer-webpack-plugin": "^7.0.0",
5555
"dotenv": "^16.4.7",
5656
"dotenv-expand": "^12.0.1",
57-
"esbuild": "^0.24.0",
57+
"esbuild": "^0.24.2",
5858
"esbuild-loader": "^4.2.2",
5959
"find-up": "^7.0.0",
6060
"get-port": "^7.1.0",
61-
"glob": "^11.0.0",
61+
"glob": "^11.0.1",
6262
"hot-accept-webpack-plugin": "^4.0.2",
6363
"js-yaml-loader": "^1.2.2",
6464
"lodash.merge": "^4.6.2",
65-
"postcss": "^8.4.49",
65+
"postcss": "^8.5.1",
6666
"postcss-loader": "^8.1.1",
67-
"postcss-preset-env": "^10.1.1",
67+
"postcss-preset-env": "^10.1.3",
6868
"resolve-url-loader": "^5.0.0",
69-
"sass-embedded": "^1.82.0",
69+
"sass-embedded": "^1.83.4",
7070
"sass-loader": "^16.0.4",
71-
"tailwind-config-viewer": "^2.0.4",
72-
"terser-webpack-plugin": "^5.3.10",
71+
"terser-webpack-plugin": "^5.3.11",
7372
"webpack": "^5.97.1",
7473
"webpack-assets-manifest": "^5.2.1",
7574
"webpack-bundle-analyzer": "^4.10.2",

packages/webpack-config/src/presets/tailwindcss.js

+1-28
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import merge from 'lodash.merge';
2-
import { findUpSync } from 'find-up';
3-
import chalk from 'chalk';
42
import { createRequire } from 'module';
5-
import { withTrailingSlash, withoutTrailingSlash, withLeadingSlash } from '../utils/index.js';
63

74
const require = createRequire(import.meta.url);
85

@@ -14,7 +11,7 @@ const require = createRequire(import.meta.url);
1411
export default function tailwindcss(options = {}) {
1512
return {
1613
name: 'tailwindcss',
17-
async handler(config, { extendWebpack, extendBrowsersync, isDev }) {
14+
async handler(config, { extendWebpack, isDev }) {
1815
const configPath = config.PATH;
1916

2017
const opts = merge(
@@ -25,30 +22,6 @@ export default function tailwindcss(options = {}) {
2522
options,
2623
);
2724

28-
if (isDev) {
29-
const { default: createServer } = await import('tailwind-config-viewer/server/index.js');
30-
await extendBrowsersync(config, async (bsConfig) => {
31-
const tailwindConfigViewerServer = createServer({
32-
tailwindConfigProvider: () =>
33-
require(findUpSync(['tailwind.config.js', 'tailwind.config.cjs'])),
34-
}).asMiddleware();
35-
36-
bsConfig.middleware = bsConfig.middleware || [];
37-
bsConfig.middleware.push({
38-
route: withLeadingSlash(withoutTrailingSlash(opts.configViewerPath)),
39-
handle: tailwindConfigViewerServer,
40-
});
41-
42-
bsConfig.infos = bsConfig.infos || [];
43-
bsConfig.infos.push(
44-
(url) =>
45-
`Tailwind Viewer runnning at ${chalk.blue(
46-
withTrailingSlash(url + opts.configViewerPath),
47-
)}`,
48-
);
49-
});
50-
}
51-
5225
await extendWebpack(config, async (webpackConfig) => {
5326
const tailwind = opts.path
5427
? opts.path

packages/webpack-config/src/utils/index.js

-53
This file was deleted.

0 commit comments

Comments
 (0)