Skip to content

Commit

Permalink
feat(compiler): include getAssetPath in generated export statement
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduy1407 committed Dec 5, 2023
1 parent 6a62cd8 commit 6751fd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ const generateCustomElementsTypesOutput = async (
]
: []),
`/**`,
` * Get the base path to where the assets can be found. Use "setAssetPath(path)"`,
` * if the path needs to be customized.`,
` */`,
`export declare const getAssetPath: (path: string) => string;`,
``,
`/**`,
` * Used to manually set the base path where assets can be found.`,
` * If the script is used as "module", it's recommended to use "import.meta.url",`,
` * such as "setAssetPath(import.meta.url)". Other options include`,
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/output-targets/dist-custom-elements/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export const generateEntryPoint = (

// Exports that are always present
exports.push(
`export { setAssetPath, setNonce, setPlatformOptions } from '${RINDO_INTERNAL_CLIENT_ID}';`,
`export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '${RINDO_INTERNAL_CLIENT_ID}';`,
`export * from '${USER_INDEX_ENTRY_ID}';`,
);

Expand Down

0 comments on commit 6751fd9

Please sign in to comment.