@webiny/build-tools 6.3.0-beta.2 → 6.3.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -39,7 +39,8 @@ export const createRsbuildConfig = ({ cwd }) => {
39
39
  ),
40
40
  tailwindcss({
41
41
  base: getTailwindBasePath(paths.projectRootFolder)
42
- })
42
+ }),
43
+ createStripTailwindSourceLeftoverPlugin()
43
44
  ]);
44
45
  },
45
46
  rspack: {
@@ -50,7 +51,7 @@ export const createRsbuildConfig = ({ cwd }) => {
50
51
  }
51
52
  }
52
53
  },
53
- server: { port: 3001 },
54
+ server: { port: process.env.PORT || 3001 },
54
55
  html: {
55
56
  template: paths.projectRootFolder + "/public/index.html"
56
57
  },
@@ -125,6 +126,20 @@ const createInjectTailwindSourcePlugin = sourcePath => ({
125
126
  }
126
127
  });
127
128
 
129
+ /*
130
+ Removes any leftover `@source` at-rule from the output. Tailwind v4 strips the
131
+ directive from files it processes, but `@tailwindcss/postcss` only processes
132
+ files containing one of its trigger at-rules; for other files (e.g., pre-bundled
133
+ component CSS imported through JS), the injected directive would otherwise
134
+ survive into the production bundle, exposing the absolute build-machine path.
135
+ */
136
+ const createStripTailwindSourceLeftoverPlugin = () => ({
137
+ postcssPlugin: "strip-tailwind-source-leftover",
138
+ Once(root) {
139
+ root.walkAtRules("source", node => node.remove());
140
+ }
141
+ });
142
+
128
143
  const getEnvVars = () => {
129
144
  const raw = Object.keys(process.env)
130
145
  .filter(key => {
@@ -4,7 +4,9 @@ import chalk from "chalk";
4
4
  export const printBuildStats =
5
5
  ({ cwd, label = "build", extensions = [".js", ".mjs", ".css"] }) =>
6
6
  ({ stats }) => {
7
- if (!stats) return;
7
+ if (!stats) {
8
+ return;
9
+ }
8
10
 
9
11
  const statsJson = stats.toJson({ assets: true, children: false });
10
12
  const assets = statsJson.assets || [];
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@webiny/build-tools",
3
- "version": "6.3.0-beta.2",
3
+ "version": "6.3.0-beta.3",
4
4
  "type": "module",
5
- "main": "index.js",
5
+ "exports": {
6
+ ".": "./index.js",
7
+ "./*": "./*"
8
+ },
6
9
  "description": "A collection of utilities for Webiny project.",
7
10
  "repository": {
8
11
  "type": "git",
@@ -15,24 +18,23 @@
15
18
  ],
16
19
  "dependencies": {
17
20
  "@babel/core": "7.29.0",
18
- "@babel/preset-env": "7.29.2",
21
+ "@babel/preset-env": "7.29.3",
19
22
  "@babel/preset-react": "7.28.5",
20
23
  "@babel/preset-typescript": "7.28.5",
21
24
  "@babel/runtime": "7.29.2",
22
25
  "@rsbuild/core": "1.7.5",
23
26
  "@rsbuild/plugin-react": "1.4.6",
24
- "@rsbuild/plugin-sass": "1.5.1",
27
+ "@rsbuild/plugin-sass": "1.5.2",
25
28
  "@rsbuild/plugin-svgr": "1.3.1",
26
29
  "@rsbuild/plugin-type-check": "1.3.4",
27
30
  "@rspack/core": "1.7.11",
28
31
  "@svgr/webpack": "8.1.0",
29
- "@swc/plugin-emotion": "14.8.0",
32
+ "@swc/plugin-emotion": "14.9.0",
30
33
  "@tailwindcss/postcss": "4.2.4",
31
34
  "@types/webpack-env": "1.18.8",
32
35
  "chalk": "5.6.2",
33
36
  "chokidar": "5.0.0",
34
37
  "css-loader": "7.1.4",
35
- "eslint": "10.2.1",
36
38
  "fast-glob": "3.3.3",
37
39
  "find-up": "8.0.0",
38
40
  "fs-extra": "11.3.4",
@@ -73,7 +75,6 @@
73
75
  "react-refresh",
74
76
  "style-loader",
75
77
  "typescript",
76
- "eslint",
77
78
  "sass-loader",
78
79
  "sass",
79
80
  "bufferutil",
@@ -87,5 +88,5 @@
87
88
  "access": "public",
88
89
  "directory": "."
89
90
  },
90
- "gitHead": "c5ae1dbcb99bf7457449ef67aef19c5b4b1ffc4c"
91
+ "gitHead": "e154ec3326903876c357d35422dc60d29e061419"
91
92
  }
@@ -1,5 +1,5 @@
1
1
  import fs from "fs";
2
- import { dirname, extname, join, parse, relative } from "path";
2
+ import { dirname, join, parse, relative } from "path";
3
3
  import * as babel from "@babel/core";
4
4
  import glob from "fast-glob";
5
5
 
@@ -53,13 +53,11 @@ const defaults = {
53
53
 
54
54
  export const linkWorkspaces = async ({ whitelist, blacklist } = defaults) => {
55
55
  console.log(`Linking project workspaces...`);
56
- //eslint-disable-next-line import/dynamic-import-chunkname
57
56
  const { PackageJson } = await import("../utils/PackageJson.js");
58
57
 
59
58
  whitelist = (whitelist || []).map(p => path.resolve(p));
60
59
  blacklist = (blacklist || []).map(p => path.resolve(p));
61
60
  // Filter packages to only those in the whitelisted folders
62
- //eslint-disable-next-line import/dynamic-import-chunkname
63
61
  const getYarnWorkspaces = await import("get-yarn-workspaces").then(m => m.default ?? m);
64
62
  const packages = getYarnWorkspaces(process.cwd())
65
63
  .map(pkg => pkg.replace(/\//g, path.sep))
package/.eslintrc.cjs DELETED
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- extends: ["../../.eslintrc.cjs"],
3
- rules: {
4
- "import/dynamic-import-chunkname": 0
5
- }
6
- };