Skip to content

Commit 0d6e7d1

Browse files
committed
add test for regular import
1 parent 2793f90 commit 0d6e7d1

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

jscomp/test/ImportAttributes.js

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

jscomp/test/ImportAttributes.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
// Generated by ReScript, PLEASE EDIT WITH CARE
22

3+
import * as MyCssCss from "./myCss.css" with {"type": "css", "some-identifier": "yep"};
34
import MyJsonJson from "./myJson.json" with {"type": "json", "some-identifier": "yep"};
45

56
var myJson = MyJsonJson;
67

78
console.log(myJson);
89

10+
var buttonCss = MyCssCss.button;
11+
12+
console.log(buttonCss);
13+
914
export {
1015
myJson ,
16+
buttonCss ,
1117
}
1218
/* myJson Not a pure module */

jscomp/test/ImportAttributes.res

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44
external myJson: Js.Json.t = "default"
55

66
Js.log(myJson)
7+
8+
@module({from: "./myCss.css", with: {type_: "css", \"some-identifier": "yep"}})
9+
external buttonCss: string = "button"
10+
11+
Js.log(buttonCss)

0 commit comments

Comments
 (0)