@eightshift/frontend-libs-tailwind 1.4.1 → 1.4.2

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
6
6
 
7
+ ## [1.4.2] - 2024-10-03
8
+ - Fixed bug with `combinations` output in `tailwindClasses` helper.
9
+ - Fixed CSS `url()` imports for images not working because of Webpack config.
10
+
7
11
  ## [1.4.1] - 2024-10-01
8
12
  - `tailwindClasses` check will now work fine even if no `parts` are defined.
9
13
 
@@ -63,6 +67,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a
63
67
 
64
68
  [Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD
65
69
 
70
+ [1.4.2]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.1...1.4.2
66
71
  [1.4.1]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.0...1.4.1
67
72
  [1.4.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.3...1.4.0
68
73
  [1.3.3]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.2...1.3.3
package/bun.lockb ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eightshift/frontend-libs-tailwind",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
5
5
  "author": {
6
6
  "name": "Eightshift team",
@@ -43,7 +43,6 @@
43
43
  "eslint": "^9.11.1",
44
44
  "eslint-config-prettier": "^9.1.0",
45
45
  "eslint-plugin-prettier": "^5.2.1",
46
- "file-loader": "^6.2.0",
47
46
  "globals": "^15.9.0",
48
47
  "husky": "^9.1.6",
49
48
  "lightningcss": "^1.27.0",
@@ -435,12 +435,12 @@ const processCombination = (partName, combo, attributes, manifest) => {
435
435
  for (const [attributeName, allowedValue] of Object.entries(combo?.attributes ?? {})) {
436
436
  const optionValue = checkAttr(attributeName, attributes, manifest, true);
437
437
 
438
- if (Array.isArray(allowedValue) && !allowedValue.includes(optionValue)) {
438
+ const isArrayCondition = Array.isArray(allowedValue);
439
+
440
+ if (isArrayCondition && !allowedValue.includes(optionValue)) {
439
441
  matches = false;
440
442
  break;
441
- }
442
-
443
- if (optionValue !== allowedValue) {
443
+ } else if (!isArrayCondition && optionValue !== allowedValue) {
444
444
  matches = false;
445
445
  break;
446
446
  }
package/webpack/base.mjs CHANGED
@@ -78,29 +78,6 @@ export default (options) => {
78
78
  });
79
79
  }
80
80
 
81
- // Module for Images.
82
- if (!options.overrides.includes('images')) {
83
- module.rules.push({
84
- test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
85
- use: [
86
- {
87
- loader: 'url-loader',
88
- options: {
89
- limit: 8192,
90
- },
91
- },
92
- ],
93
- type: 'javascript/auto',
94
- });
95
-
96
- module.rules.push({
97
- test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
98
- exclude: [/fonts/, /node_modules/],
99
- use: 'file-loader?name=[name].[ext]',
100
- dependency: { not: ['url'] },
101
- });
102
- }
103
-
104
81
  // Module for CSS.
105
82
  if (!options.overrides.includes('css')) {
106
83
  module.rules.push({
@@ -128,6 +105,15 @@ export default (options) => {
128
105
  });
129
106
  }
130
107
 
108
+ // Module for Images.
109
+ if (!options.overrides.includes('images')) {
110
+ module.rules.push({
111
+ test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
112
+ exclude: [/fonts/, /node_modules/],
113
+ type: 'asset/resource',
114
+ });
115
+ }
116
+
131
117
  const resolve = {
132
118
  symlinks: false,
133
119
  };