Skip to content

Commit

Permalink
correct bundling of js
Browse files Browse the repository at this point in the history
  • Loading branch information
drbeat committed Jan 1, 2024
1 parent dfc41b4 commit ea67f18
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
4 changes: 1 addition & 3 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
<title>PicCap - Hyperion Sender App</title>
<script src="./webOSTVjs-1.2.4/webOSTV.js" charset="utf-8"></script>
<script src="./webOSTVjs-1.2.4/webOSTV-dev.js" charset="utf-8"></script>
<script type="text/javascript" src="./ui.bundled.js"></script>
<script type="text/javascript" src="./servicecalls.bundled.js"></script>
<script type="text/javascript" src="./spatialnavigation.bundled.js"></script>
<script src="./index.js"></script>
<link rel="stylesheet" href="./css/basicui.css" media="screen">
<link rel="stylesheet" href="./css/blueui.css" media="screen">
<link rel="stylesheet" href="./css/darkui.css" media="screen">
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'core-js/stable';
import './domrect-polyfill';
import './servicecalls';
import './ui';
import './spatial-navigation';
2 changes: 0 additions & 2 deletions frontend/src/servicecalls.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require('core-js/stable');

const availableQuirks = {
// DILE_VT
QUIRK_DILE_VT_CREATE_EX: '0x1',
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/spatial-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*
* Licensed under the MIT license (MIT)
*/
import 'core-js';
import './domrect-polyfill';

(function () {
// The polyfill must not be executed, if it's already enabled via browser engine or browser extensions.
Expand Down
10 changes: 4 additions & 6 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ export default defineConfig({
],
build: {
rollupOptions: {
input: {
ui: normalizePath(path.resolve(__dirname, './frontend/src/ui.js')),
servicecalls: normalizePath(path.resolve(__dirname, './frontend/src/servicecalls.js')),
spatialnavigation: normalizePath(path.resolve(__dirname, './frontend/src/spatial-navigation.js')),
},
input: [
normalizePath(path.resolve(__dirname, './frontend/src/index.js')),
],
output: {
entryFileNames: `[name].bundled.js`,
entryFileNames: `[name].js`,
},
},
target: 'ES2015',
Expand Down

0 comments on commit ea67f18

Please sign in to comment.