Closed luboid closed 3 years ago
Hi,
Here is another way to bootstrap aurelia
var origin = window.location.origin; var pathname = window.location.pathname; var baseUrl = origin + pathname.toLowerCase().replace("index-latest.html", ""); // var baseUrl = "http://localhost:62960"; require.config({ baseUrl: baseUrl, paths: { aurelia: baseUrl + "/scripts/aurelia", webcomponentsjs: baseUrl + "/scripts/webcomponentsjs", views: baseUrl + "/views", underscore: baseUrl + "/scripts/underscore/underscore.min", three: baseUrl + "/scripts/three/three" }, bundles: { 'aurelia/aurelia-bundle-latest': ['aurelia-bootstrapper', 'aurelia-loader-default'] }, shim: { three: { exports: "THREE" }, underscore: { exports: "_" }, 'aurelia-bootstrapper':{ deps: ['aurelia-loader-default'] } } }); require(["aurelia-bootstrapper"]);
or without any require([])
var origin = window.location.origin; var pathname = window.location.pathname; var baseUrl = origin + pathname.toLowerCase().replace("index-latest.html", ""); // var baseUrl = "http://localhost:62960"; require.config({ baseUrl: baseUrl, deps: ['aurelia-bootstrapper'], paths: { aurelia: baseUrl + "/scripts/aurelia", webcomponentsjs: baseUrl + "/scripts/webcomponentsjs", views: baseUrl + "/views", underscore: baseUrl + "/scripts/underscore/underscore.min", three: baseUrl + "/scripts/three/three" }, bundles: { 'aurelia/aurelia-bundle-latest': ['aurelia-bootstrapper', 'aurelia-loader-default'] }, shim: { three: { exports: "THREE" }, underscore: { exports: "_" }, 'aurelia-bootstrapper': { deps: ['aurelia-loader-default'] } } });
I spent time understanding why Aurelia do not start before find this post, thanks :+1:
Hi,
Here is another way to bootstrap aurelia
or without any require([])