-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: manually load code languages on our end (fixes file protocol iss…
…ues)
- Loading branch information
1 parent
37c59b0
commit 5c07b16
Showing
3 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"extends": [ | ||
"@parcel/config-default" | ||
] | ||
"extends": ["@parcel/config-default"], | ||
"resolvers": ["@parcel/resolver-default", "@parcel/resolver-glob"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* prose-core-views | ||
* | ||
* Copyright: 2024, Valerian Saliou <[email protected]> | ||
* License: Mozilla Public License v2.0 (MPL v2.0) | ||
*/ | ||
|
||
// IMPORTS | ||
|
||
// Notice: languages need to be imported manually there, since the dynamic \ | ||
// 'import()' method as provided by the '@speed-highlight/core' library do \ | ||
// not work in 'file://' loading mode (eg. Tauri builds of the Prose app \ | ||
// implementing the views). This catch-all import depends on the \ | ||
// '@parcel/resolver-glob' resolver. | ||
import * as highlightLanguages from "@speed-highlight/core/dist/languages/*.js"; | ||
|
||
// EXPORTS | ||
|
||
export default highlightLanguages; |