Skip to content
Merged
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
25 changes: 25 additions & 0 deletions packages/core/config/config.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,26 @@ interface IConfigEmbed extends IConfigEmbedProps {
android?: IConfigEmbedProps;
}

interface ISecurityConfig {
/**
* Enable remote ES module loading in production.
* Default: false
*
* When false, any attempt to import("https://...") in production
* will throw an error.
*/
allowRemoteModules: boolean;

/**
* Restrict remote modules to specific URL prefixes.
* Only used when allowRemoteModules is true.
*
* If empty or not provided, all HTTPS URLs are allowed
* (not recommended for production).
*/
remoteModuleAllowlist?: string[];
}

type BundlerType = 'webpack' | 'vite';

export interface NativeScriptConfig {
Expand Down Expand Up @@ -315,4 +335,9 @@ export interface NativeScriptConfig {
* Set project persistent hooks to run
*/
hooks?: IConfigHook[];

/**
* Security configurations
*/
security?: ISecurityConfig;
}