Skip to content

Commit

Permalink
Merge pull request #54 from infinum/release/1.4.2
Browse files Browse the repository at this point in the history
1.4.2
  • Loading branch information
goranalkovic-infinum authored Oct 3, 2024
2 parents 8bec0ff + df95127 commit 0329103
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 29 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

## [1.4.2] - 2024-10-03
- Fixed bug with `combinations` output in `tailwindClasses` helper.
- Fixed CSS `url()` imports for images not working because of Webpack config.

## [1.4.1] - 2024-10-01
- `tailwindClasses` check will now work fine even if no `parts` are defined.

Expand Down Expand Up @@ -63,6 +67,7 @@ This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a

[Unreleased]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/master...HEAD

[1.4.2]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.1...1.4.2
[1.4.1]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.4.0...1.4.1
[1.4.0]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.3...1.4.0
[1.3.3]: https://github.com/infinum/eightshift-frontend-libs-tailwind/compare/1.3.2...1.3.3
Expand Down
Binary file added bun.lockb
Binary file not shown.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eightshift/frontend-libs-tailwind",
"version": "1.4.1",
"version": "1.4.2",
"description": "A framework for creating modern Gutenberg themes with styling provided by Tailwind CSS.",
"author": {
"name": "Eightshift team",
Expand Down Expand Up @@ -49,7 +49,6 @@
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"file-loader": "^6.2.0",
"globals": "^15.9.0",
"husky": "^9.1.6",
"lightningcss": "^1.27.0",
Expand Down
8 changes: 4 additions & 4 deletions scripts/editor/tailwindcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,12 +435,12 @@ const processCombination = (partName, combo, attributes, manifest) => {
for (const [attributeName, allowedValue] of Object.entries(combo?.attributes ?? {})) {
const optionValue = checkAttr(attributeName, attributes, manifest, true);

if (Array.isArray(allowedValue) && !allowedValue.includes(optionValue)) {
const isArrayCondition = Array.isArray(allowedValue);

if (isArrayCondition && !allowedValue.includes(optionValue)) {
matches = false;
break;
}

if (optionValue !== allowedValue) {
} else if (!isArrayCondition && optionValue !== allowedValue) {
matches = false;
break;
}
Expand Down
32 changes: 9 additions & 23 deletions webpack/base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,29 +78,6 @@ export default (options) => {
});
}

// Module for Images.
if (!options.overrides.includes('images')) {
module.rules.push({
test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192,
},
},
],
type: 'javascript/auto',
});

module.rules.push({
test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
exclude: [/fonts/, /node_modules/],
use: 'file-loader?name=[name].[ext]',
dependency: { not: ['url'] },
});
}

// Module for CSS.
if (!options.overrides.includes('css')) {
module.rules.push({
Expand Down Expand Up @@ -128,6 +105,15 @@ export default (options) => {
});
}

// Module for Images.
if (!options.overrides.includes('images')) {
module.rules.push({
test: /\.(png|svg|jpg|jpeg|gif|ico|webp)$/i,
exclude: [/fonts/, /node_modules/],
type: 'asset/resource',
});
}

const resolve = {
symlinks: false,
};
Expand Down

0 comments on commit 0329103

Please sign in to comment.