Files
ai-course/node_modules/postcss-overflow-shorthand/dist/index.cjs
KQL ce6aa207e9 fix: 修复图片路径以适配GitHub Pages base path
- 将所有图片路径从绝对路径改为使用 process.env.PUBLIC_URL
- 修复 HomePage.tsx 中所有图片引用
- 修复 CoursePage.tsx 中所有图片引用
- 确保图片在 GitHub Pages 上正确加载

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 09:24:45 +08:00

2 lines
843 B
JavaScript

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=e(require("postcss-value-parser"));const r=e=>{const r=!("preserve"in Object(e))||Boolean(e.preserve);return{postcssPlugin:"postcss-overflow-shorthand",Declaration:(e,{result:t})=>{if("overflow"!==e.prop.toLowerCase())return;let s="",a="";const l=e.value;try{const e=o.default(l).nodes.slice().filter((e=>"comment"!==e.type&&"space"!==e.type));if(e.length<2)return;s=o.default.stringify(e[0]),a=o.default.stringify(e[1])}catch(o){return void e.warn(t,`Failed to parse value '${l}' as a shorthand for "overflow". Leaving the original value intact.`)}s&&a&&(s.toLowerCase()===a.toLowerCase()?e.cloneBefore({value:s}):(e.cloneBefore({prop:"overflow-x",value:s}),e.cloneBefore({prop:"overflow-y",value:a})),r||e.remove())}}};r.postcss=!0,module.exports=r;