Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.26 KB

File metadata and controls

44 lines (31 loc) · 1.26 KB

Battlefield 6 Portal Mod Template

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.

Typescript Features and Limitations (WIP)

  • 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";
  • Handles the following export patterns:

    • export const/let/var
    • export function/class
    • export default
    • export { a, b as c }
    • export * from "./mod"
  • Outputs a single .ts bundle that can be uploaded to Battlefield 6 Portal.


Usage

  1. Copy this template

  2. Install dependencies:

npm install
  1. Bundle the typescript
npm run bundle

The output will be in dist/output.ts

  1. Upload to your Portal Experience