File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,14 @@ let string_of_module_id
227
227
| Package_found (dep_package_name, dep_path),
228
228
Package_script
229
229
->
230
+ #if BS_NATIVE then
231
+ if Filename. is_relative dep_path then
232
+ dep_package_name // dep_path // js_file
233
+ else
234
+ dep_path // js_file
235
+ #else
230
236
dep_package_name // dep_path // js_file
237
+ #end
231
238
232
239
| Package_found (dep_package_name, dep_path),
233
240
Package_found (cur_package_name, cur_path) ->
@@ -242,7 +249,14 @@ let string_of_module_id
242
249
else
243
250
begin match module_system with
244
251
| AmdJS | NodeJS | Es6 ->
252
+ #if BS_NATIVE then
253
+ if Filename. is_relative dep_path then
254
+ dep_package_name // dep_path // js_file
255
+ else
256
+ dep_path // js_file
257
+ #else
245
258
dep_package_name // dep_path // js_file
259
+ #end
246
260
(* * Note we did a post-processing when working on Windows *)
247
261
| Es6_global
248
262
| AmdJS_global ->
Original file line number Diff line number Diff line change @@ -324,12 +324,19 @@ let lambda_as_module
324
324
output_chan stdout);
325
325
if not @@ ! Clflags. dont_write_files then
326
326
Ext_pervasives. with_file_as_chan
327
+ #if BS_NATIVE then
328
+ (if Filename. is_relative _path then Lazy. force Ext_filename. package_dir // _path // basename
329
+ (* #913 only generate little-case js file *)
330
+ else _path // basename) output_chan )
331
+ #else
327
332
(Lazy. force Ext_filename. package_dir //
328
333
_path //
329
334
basename
330
335
(* #913 only generate little-case js file *)
331
336
) output_chan )
332
337
338
+ #end
339
+
333
340
(* We can use {!Env.current_unit = "Pervasives"} to tell if it is some specific module,
334
341
We need handle some definitions in standard libraries in a special way, most are io specific,
335
342
includes {!Pervasives.stdin, Pervasives.stdout, Pervasives.stderr}
You can’t perform that action at this time.
0 commit comments