私は次のファイル構造を持っています:
|- index.html
vendor
|- jquery.min.js (some libraries)
js
|- app.js
次のURLを使用してブラウザからindex.htmlを読み込もうとすると:
http://localhost/~myname/WebFrontend/
で次のエラーが発生しますconf.js
(conf.jsのコメントを参照)。
この問題をどのように修正すればよいですか?
// index.html
<script data-main="js/conf" src="./vendor/require.js"></script>
// conf.js
requirejs.config({
baseUrl: '../vendor',
paths: {
jquery: 'jquery.min', // it works
}
});
require(['../js/app']); // http://localhost/~mynane/js/router.js not found
require(['./js/app']); // http://localhost/~myname/vendor/js/router.js not found
// I would like to point to http://localhost/~antoniopierro/WebFrontend/js/router.js