This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from EpicGames/master
Merge changes from master
- Loading branch information
Showing
10 changed files
with
140 additions
and
128 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,75 +1,75 @@ | ||
// Copyright Epic Games, Inc. All Rights Reserved. | ||
|
||
const path = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const webpack = require('webpack'); | ||
const fs = require('fs'); | ||
|
||
const pages = fs.readdirSync('./src', { withFileTypes: true }) | ||
.filter(item => !item.isDirectory()) | ||
.filter(item => path.parse(item.name).ext === '.html') | ||
.map(htmlFile => path.parse(htmlFile.name).name); | ||
|
||
module.exports = { | ||
entry: pages.reduce((config, page) => { | ||
config[page] = `./src/${page}.ts`; | ||
return config; | ||
}, {}), | ||
|
||
plugins: [].concat(pages.map((page) => new HtmlWebpackPlugin({ | ||
title: `${page}`, | ||
template: `./src/${page}.html`, | ||
filename: `${page}.html`, | ||
chunks: [page], | ||
}), )), | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
exclude: [ | ||
/node_modules/, | ||
], | ||
}, | ||
{ | ||
test: /\.html$/i, | ||
use: 'html-loader' | ||
}, | ||
{ | ||
test: /\.css$/, | ||
type: 'asset/resource', | ||
generator: { | ||
filename: 'css/[name][ext]' | ||
} | ||
}, | ||
{ | ||
test: /\.(png|svg)$/i, | ||
type: 'asset/resource', | ||
generator: { | ||
filename: 'images/[name][ext]' | ||
} | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.tsx', '.ts', '.js', '.svg', '.json'], | ||
}, | ||
output: { | ||
filename: '[name].js', | ||
library: 'epicgames-frontend', | ||
libraryTarget: 'umd', | ||
path: path.resolve(__dirname, '../../../SignallingWebServer/Public'), | ||
clean: true, | ||
globalObject: 'this', | ||
hashFunction: 'xxhash64', | ||
}, | ||
experiments: { | ||
futureDefaults: true | ||
}, | ||
devServer: { | ||
static: { | ||
directory: path.join(__dirname, '../../../SignallingWebServer/Public'), | ||
}, | ||
}, | ||
} | ||
// Copyright Epic Games, Inc. All Rights Reserved. | ||
|
||
const path = require('path'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const webpack = require('webpack'); | ||
const fs = require('fs'); | ||
|
||
const pages = fs.readdirSync('./src', { withFileTypes: true }) | ||
.filter(item => !item.isDirectory()) | ||
.filter(item => path.parse(item.name).ext === '.html') | ||
.map(htmlFile => path.parse(htmlFile.name).name); | ||
|
||
module.exports = { | ||
entry: pages.reduce((config, page) => { | ||
config[page] = `./src/${page}.ts`; | ||
return config; | ||
}, {}), | ||
|
||
plugins: [].concat(pages.map((page) => new HtmlWebpackPlugin({ | ||
title: `${page}`, | ||
template: `./src/${page}.html`, | ||
filename: `${page}.html`, | ||
chunks: [page], | ||
}), )), | ||
|
||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
exclude: [ | ||
/node_modules/, | ||
], | ||
}, | ||
{ | ||
test: /\.html$/i, | ||
use: 'html-loader' | ||
}, | ||
{ | ||
test: /\.css$/, | ||
type: 'asset/resource', | ||
generator: { | ||
filename: 'css/[name][ext]' | ||
} | ||
}, | ||
{ | ||
test: /\.(png|svg)$/i, | ||
type: 'asset/resource', | ||
generator: { | ||
filename: 'images/[name][ext]' | ||
} | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: ['.tsx', '.ts', '.js', '.svg', '.json'], | ||
}, | ||
output: { | ||
filename: '[name].js', | ||
library: 'epicgames-frontend', | ||
libraryTarget: 'umd', | ||
path: path.resolve(__dirname, '../../../SignallingWebServer/Public'), | ||
clean: true, | ||
globalObject: 'this', | ||
hashFunction: 'xxhash64', | ||
}, | ||
experiments: { | ||
futureDefaults: true | ||
}, | ||
devServer: { | ||
static: { | ||
directory: path.join(__dirname, '../../../SignallingWebServer/Public'), | ||
}, | ||
}, | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
// Copyright Epic Games, Inc. All Rights Reserved. | ||
|
||
const package = require('./package.json'); | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
module.exports = { | ||
entry: { | ||
index: './src/pixelstreamingfrontend.ts' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
exclude: [/node_modules/] | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['.tsx', '.ts', '.js'] | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
LIBRARY_VERSION: JSON.stringify(package.version) | ||
}) | ||
], | ||
output: { | ||
library: 'lib-pixelstreamingfrontend', // exposed variable that will provide access to the library classes | ||
libraryTarget: 'umd', | ||
path: path.resolve(__dirname, 'dist'), | ||
clean: true, | ||
globalObject: 'this' | ||
} | ||
}; | ||
// Copyright Epic Games, Inc. All Rights Reserved. | ||
|
||
const package = require('./package.json'); | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
module.exports = { | ||
entry: { | ||
index: './src/pixelstreamingfrontend.ts' | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.tsx?$/, | ||
loader: 'ts-loader', | ||
exclude: [/node_modules/] | ||
} | ||
] | ||
}, | ||
resolve: { | ||
extensions: ['.tsx', '.ts', '.js'] | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
LIBRARY_VERSION: JSON.stringify(package.version) | ||
}) | ||
], | ||
output: { | ||
library: 'lib-pixelstreamingfrontend', // exposed variable that will provide access to the library classes | ||
libraryTarget: 'umd', | ||
path: path.resolve(__dirname, 'dist'), | ||
clean: true, | ||
globalObject: 'this' | ||
} | ||
}; |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.1.0 | ||
0.1.1 |
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