From 4a0cfb5be99b7663dec7cd09bc9bedcbbc3aee56 Mon Sep 17 00:00:00 2001 From: "ringmatter@fastmail.com" Date: Sun, 1 Dec 2019 09:14:10 +0100 Subject: [PATCH] ADDED standalone.js script to inject standalone mode in dev server --- README.md | 3 --- src/standalone.js | 4 ++++ webpack.dev.js | 11 ++--------- 3 files changed, 6 insertions(+), 12 deletions(-) create mode 100644 src/standalone.js diff --git a/README.md b/README.md index e0e5afa18..71d6ebdf7 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,3 @@ Jellyfin Web is the frontend used for most of the clients available for end user yarn serve ``` -The webpack dev server will proxy backend requests to http://localhost:8096 - so -you'll need to start a jellyfin backend either via docker or by running -the application in the jellyfin main repository. \ No newline at end of file diff --git a/src/standalone.js b/src/standalone.js new file mode 100644 index 000000000..5692e8ddd --- /dev/null +++ b/src/standalone.js @@ -0,0 +1,4 @@ +(function() { + "use strict"; + window.appMode='standalone'; +})(); diff --git a/webpack.dev.js b/webpack.dev.js index 6d1fea558..3aecac1a5 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -30,14 +30,7 @@ module.exports = merge(common, { }), new ConcatPlugin({ name: 'scripts/apploader.js', - filesToConcat: ['./scripts/apploader.js'] + filesToConcat: ['./standalone.js', './scripts/apploader.js'] }) - ], - devServer: { - proxy: { - "!/**/*.html" : "http://localhost:8096", - "!/**/*.css" : "http://localhost:8086", - "!/**/*.js" : "http://localhost:8086" - } - } + ] });