Skip to content

Update PostCSS to v8.4.49 and improve code readability #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
style: destructure attr to improve code readability (eslint: prefer-d…
…estructuring)
  • Loading branch information
Vhivi committed Jan 3, 2025
commit 1bdcf268cb03ca382d62f6bd9c68b1e2da6f5467
2 changes: 1 addition & 1 deletion lib/templateCompilerModules/assetUrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function rewrite(
transformAssetUrlsOption?: TransformAssetUrlsOptions
) {
if (attr.name === name) {
const value = attr.value
const { value } = attr
// only transform static URLs
if (value.charAt(0) === '"' && value.charAt(value.length - 1) === '"') {
attr.value = urlToRequire(value.slice(1, -1), transformAssetUrlsOption)
Expand Down
2 changes: 1 addition & 1 deletion lib/templateCompilerModules/srcset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function transform(
node.attrs.forEach(attr => {
if (attr.name === 'srcset') {
// same logic as in transform-require.js
const value = attr.value
const { value } = attr
const isStatic =
value.charAt(0) === '"' && value.charAt(value.length - 1) === '"'
if (!isStatic) {
Expand Down