Skip to content

Commit 04e5033

Browse files
committed
fix: installs postcss-import and postcss-url to ensure asset paths are correct
1 parent c1c2392 commit 04e5033

File tree

3 files changed

+57
-29
lines changed

3 files changed

+57
-29
lines changed

package-lock.json

Lines changed: 47 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@
106106
"lint-staged": "16.0.0",
107107
"npm-check-updates": "18.0.1",
108108
"plop": "3.1.2",
109-
"postcss": "8.5.3",
109+
"postcss": "8.5.4",
110110
"postcss-advanced-variables": "5.0.0",
111111
"postcss-cli": "11.0.1",
112-
"postcss-custom-properties": "14.0.4",
112+
"postcss-custom-properties": "14.0.5",
113+
"postcss-import": "^16.1.0",
113114
"postcss-jsx": "0.36.4",
114115
"postcss-load-config": "6.0.1",
115116
"postcss-syntax": "0.36.2",

packages/rollup-package.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { nodeResolve } from '@rollup/plugin-node-resolve';
33
import minifyHTML from 'rollup-plugin-minify-html-literals';
44
import { readPackageJson } from '../scripts/modify-pkgjson.mjs';
55
import rollupPostcss from 'rollup-plugin-postcss';
6+
import postcssUrl from 'postcss-url';
7+
import postcssImport from 'postcss-import';
68
import postcssCustomPropertiesFallback from '../scripts/postcss-custom-properties-fallback/plugin.mjs';
79
import path from 'path';
810
import processLitCSSPlugin from '../scripts/processLitCSSPlugin.mjs';
@@ -50,6 +52,11 @@ const createCSSFilesConfig = (cssFiles = []) => {
5052
rollupPostcss({
5153
plugins: [
5254
postcssCustomPropertiesFallback({ importFrom: properties }),
55+
postcssImport({
56+
plugins: [
57+
postcssUrl(), // This plugin is used to handle URLs in imported CSS files
58+
],
59+
}),
5360
],
5461
extract: path.resolve(`./dist/${name}.css`),
5562
}),

0 commit comments

Comments
 (0)