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
2 changes: 1 addition & 1 deletion templates/commonjs-shim.cts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{%- match out_lib_path -%}
{%- when LibPath::Modules(mods) -%}
export type LibPathResult = {
type LibPathResult = {
triple: string;
path: string;
};
Expand Down
6 changes: 3 additions & 3 deletions templates/sys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ import {
UniffiError,
} from 'uniffi-bindgen-react-native';
{% if let LibPath::Modules(_) = out_lib_path %}
// @ts-ignore
import { getLibPathModule } from './{{ commonjs_shim_cjs_main_file_name }}.cts';
import * as commonjsShim from './{{ commonjs_shim_cjs_main_file_name }}.cts';
{% endif %}


Expand Down Expand Up @@ -66,7 +65,8 @@ function _uniffiLoad() {
{%- endif -%}

{% when LibPath::Modules(_) %}
const libraryPath = (getLibPathModule() as { triple: string, path: string }).path;
// @ts-ignore
const libraryPath = (commonjsShim.getLibPathModule() as { triple: string, path: string }).path;

{% endmatch %}

Expand Down