Skip to content

Commit

Permalink
Fix postcss-selector-parser cjs exports (close #411)
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Aug 28, 2022
1 parent cda4fd8 commit 5bbbe5e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/node_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ var requireModeAllowList = []string{
"stream-http",
"typescript",
"vscode-oniguruma",
"postcss-selector-parser",
}

func parseCJSModuleExports(buildDir string, importPath string, nodeEnv string) (ret cjsExportsResult, err error) {
Expand Down
17 changes: 17 additions & 0 deletions test/issue-411/issue-411.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { assertStringIncludes } from "https://deno.land/[email protected]/testing/asserts.ts";

import postcss from "http://localhost:8080/[email protected]";
import nested from "http://localhost:8080/[email protected]";

Deno.test("issue #411", () => {
const { css } = postcss([nested]).process(`
.a {
color: blue;
& .b {
color: red;
}
}
`);
assertStringIncludes(css, ".a .b {");
});

0 comments on commit 5bbbe5e

Please sign in to comment.