summaryrefslogtreecommitdiffstats
path: root/settings/src/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'settings/src/main.js')
-rw-r--r--settings/src/main.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/settings/src/main.js b/settings/src/main.js
index e8171c95ba3..ef27162942e 100644
--- a/settings/src/main.js
+++ b/settings/src/main.js
@@ -19,17 +19,26 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
+import "@babel/polyfill";
import Vue from 'vue';
import { sync } from 'vuex-router-sync';
import App from './App.vue';
import router from './router';
import store from './store';
-require("babel-polyfill");
-
sync(store, router);
+// CSP config for webpack dynamic chunk loading
+// eslint-disable-next-line
+__webpack_nonce__ = btoa(OC.requestToken)
+
+// Correct the root of the app for chunk loading
+// OC.linkTo matches the apps folders
+// OC.generateUrl ensure the index.php (or not)
+// eslint-disable-next-line
+__webpack_public_path__ = OC.generateUrl(OC.linkTo('settings', 'js/'))
+
// bind to window
Vue.prototype.t = t;
Vue.prototype.OC = OC;