Skip to content

Commit 32952b5

Browse files
committed
Explicitly allow loading from the build directory
1 parent 4d990bb commit 32952b5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

text/006-local-js-dependencies.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ imported from the `/js/foo.js` file, relative to the current file and rooted at
8686
the crate root. The following rules are proposed for interpreting a `module`
8787
attribute.
8888

89+
* If the strings starts with the platform-specific representation of an absolute
90+
path to the cargo build directory (identified by `$OUT_DIR`) then the string
91+
is interpreted as a file path in the output directory. This is intended for
92+
procedural macros or build scripts which generate JS files as part of the
93+
build.
94+
8995
* If the string starts with `/`, `./`, or `../` then it's considered a path to a
9096
local file. If not, then it's passed through verbatim as the ES module import.
9197

0 commit comments

Comments
 (0)