Provides an expanded and easier to use starting template for Battlefield 6 Portal Modding. This builds off of the examples provided in the PortalSDK, and provides a project that includes type hints, import/export functionality, and a compilation step.
-
Supports relative imports only (
./and../). -
Preserves live bindings for all exports.
-
Supports circular dependencies.
-
Handles the following import styles:
- Default imports:
import Default from "./mod"; - Named imports:
import { A, B as C } from "./mod"; - Namespace imports:
import * as ns from "./mod"; - Side-effect imports:
import "./mod";
- Default imports:
-
Handles the following export patterns:
export const/let/varexport function/classexport defaultexport { a, b as c }export * from "./mod"
-
Outputs a single
.tsbundle that can be uploaded to Battlefield 6 Portal.
-
Copy this template
-
Install dependencies:
npm install- Bundle the typescript
npm run bundleThe output will be in dist/output.ts
- Upload to your Portal Experience