Skip to content

Commit f4331cf

Browse files
Merge pull request #402 from mcottontensor/backport/UE5.5/pr-397
[UE5.5] Merge pull request #397 from EpicGamesExt/esm
2 parents 7aba9e5 + 7e80f55 commit f4331cf

File tree

6 files changed

+94
-2
lines changed

6 files changed

+94
-2
lines changed

Frontend/implementations/typescript/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"scripts": {
77
"build": "npx webpack --config webpack.prod.js",
88
"build-dev": "npx webpack --config webpack.dev.js",
9+
"build-esm": "npx webpack --config webpack.esmodule.js",
910
"watch": "npx webpack --watch",
1011
"serve": "webpack serve --config webpack.dev.js",
1112
"serve-prod": "webpack serve --config webpack.prod.js",

Frontend/implementations/typescript/src/player.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Copyright Epic Games, Inc. All Rights Reserved.
22

3+
export * from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5';
4+
export * from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5';
35
import { Config, PixelStreaming, Logger, LogLevel } from '@epicgames-ps/lib-pixelstreamingfrontend-ue5.5';
46
import { Application, PixelStreamingApplicationStyle } from '@epicgames-ps/lib-pixelstreamingfrontend-ui-ue5.5';
57
const PixelStreamingApplicationStyles =

Frontend/implementations/typescript/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"outDir": "./dist",
3+
"outDir": "./dist/",
44
"noImplicitAny": true,
55
"module": "es6",
66
"esModuleInterop": true,
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Copyright Epic Games, Inc. All Rights Reserved.
2+
3+
const HtmlWebpackPlugin = require('html-webpack-plugin');
4+
const path = require('path');
5+
6+
module.exports = {
7+
mode: 'development',
8+
devtool: 'inline-source-map',
9+
entry: './src/player.ts',
10+
plugins: [
11+
new HtmlWebpackPlugin({
12+
title: `Pixel Streaming ES Module`,
13+
scriptLoading: 'module',
14+
template: `./src/player.html`,
15+
filename: `player_esm.html`
16+
}),
17+
],
18+
output: {
19+
filename: 'player.esm.js',
20+
libraryTarget: 'module',
21+
module: true,
22+
path: process.env.WEBPACK_OUTPUT_PATH ? path.resolve(process.env.WEBPACK_OUTPUT_PATH) : path.resolve(__dirname, '../../../SignallingWebServer/www'),
23+
globalObject: 'this',
24+
hashFunction: 'xxhash64',
25+
},
26+
experiments: {
27+
outputModule: true,
28+
},
29+
module: {
30+
rules: [
31+
{
32+
test: /\.tsx?$/,
33+
loader: 'ts-loader',
34+
exclude: [
35+
/node_modules/,
36+
],
37+
},
38+
{
39+
test: /\.html$/i,
40+
use: 'html-loader'
41+
},
42+
{
43+
test: /\.css$/,
44+
type: 'asset/resource',
45+
generator: {
46+
filename: 'css/[name][ext]'
47+
}
48+
},
49+
{
50+
test: /\.(png|svg|jpg|jpeg|gif)$/i,
51+
type: 'asset/resource',
52+
generator: {
53+
filename: 'images/[name][ext]'
54+
}
55+
}
56+
],
57+
},
58+
resolve: {
59+
extensions: ['.tsx', '.ts', '.js', '.svg', '.json'],
60+
},
61+
};

Frontend/library/src/Util/EventEmitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { FlagsIds, NumericParametersIds, OptionParametersIds, TextParametersIds } from '../Config/Config';
22
import { LatencyTestResults } from '../DataChannel/LatencyTestResults';
33
import { AggregatedStats } from '../PeerConnectionController/AggregatedStats';
4-
import { InitialSettings } from '../pixelstreamingfrontend';
4+
import { InitialSettings } from '../DataChannel/InitialSettings';
55
import { Messages } from '@epicgames-ps/lib-pixelstreamingcommon-ue5.5';
66
import { SettingFlag } from '../Config/SettingFlag';
77
import { SettingNumber } from '../Config/SettingNumber';

package-lock.json

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)