How to force require.js to load all resources from one directory #1711
Open
Description
I have typescript generating a javascript file that starts with this line:
define(["require", "exports", "jquery", "chart.js", "./util"], function (require, exports, $, chart, util_1) {
I want all of those dependencies to be loaded from /static/XXX.js
, however require.js
fires off the following requests:
/static/initialscript.js (I put the abstract path in data-main)
/static/jquery.js (exactly what I want)
/html/chart.js (uses relative path to HTML file - ERROR)
/html/util (uses relative path to HTML and doesn't append .js - ERROR)
I tried to set the base path in the require.js
configuration, however this didn't change anything.
How can I force require.js
to load all dependencies from the /static/
folder on my webserver?
Metadata
Assignees
Labels
No labels