Skip to content

Commit

Permalink
feat(css): upgrade postcss-modules (#10987)
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Nov 19, 2022
1 parent 8158ece commit 892916d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
7 changes: 0 additions & 7 deletions packages/vite/LICENSE.md
Expand Up @@ -1576,13 +1576,6 @@ Repository: https://github.com/http-party/node-http-proxy.git
---------------------------------------

## icss-replace-symbols
License: ISC
By: Glen Maddern
Repository: git+https://github.com/css-modules/icss-replace-symbols.git

---------------------------------------

## icss-utils
License: ISC
By: Glen Maddern
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Expand Up @@ -109,7 +109,7 @@
"picomatch": "^2.3.1",
"postcss-import": "^15.0.0",
"postcss-load-config": "^4.0.1",
"postcss-modules": "^5.0.0",
"postcss-modules": "^6.0.0",
"resolve.exports": "^1.1.0",
"sirv": "^2.0.2",
"source-map-js": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/css.ts
Expand Up @@ -916,9 +916,9 @@ async function compileCSS(
modulesOptions.getJSON(cssFileName, _modules, outputFileName)
}
},
async resolve(id: string) {
async resolve(id: string, importer: string) {
for (const key of getCssResolversKeys(atImportResolvers)) {
const resolved = await atImportResolvers[key](id)
const resolved = await atImportResolvers[key](id, importer)
if (resolved) {
return path.resolve(resolved)
}
Expand Down
17 changes: 8 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 892916d

Please sign in to comment.