Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions crates/mako/src/ast/css_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ impl CssAst {
let config = parser::parser::ParserConfig {
css_modules,
legacy_ie: true,
legacy_nesting: true,
..Default::default()
};

Expand Down
3 changes: 3 additions & 0 deletions crates/mako/src/ast/js_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ impl JsAst {
jsx,
decorators: true,
decorators_before_export: true,
// temporarily parse import xx.json with { type: "json" }
// e.g. https://github.com/zen-fs/core/blob/80d32c4807df4a0e887f5c33afae82fde8e62191/src/index.ts#L19
import_attributes: true,
..Default::default()
})
};
Expand Down
4 changes: 4 additions & 0 deletions e2e/fixtures/css.css-modules/src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.container {
padding-top: 80px;

h1 {
font-size: 18px;
}
}
3 changes: 2 additions & 1 deletion e2e/fixtures/css.css-modules/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import styles from "./index.css";
console.log(styles);

import pkg from "../mako.config.json" with { type: "json"};
console.log(pkg);
import('./a.css');
require('./b.css');
import "./c.css";
Expand Down
3 changes: 3 additions & 0 deletions e2e/fixtures/json/node_modules/data/foo.json

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

2 changes: 2 additions & 0 deletions e2e/fixtures/json/node_modules/data/index.js

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

2 changes: 2 additions & 0 deletions e2e/fixtures/json/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
import json from "./example.json";
import data from "data";
console.log(json);
console.log(data)
Loading