Comments (7)
Particular example - in Loading demand option #1
I load the script before closing tag.
Got the inline configuration like:
("dist/demand.js", "app/main", {
base: "./",
version: "1.0.0",
cache: false,
})
Yet nothing happens with app/main.js
file, it's not even attempting to load it in network tab.
My app/main.js
file looks like your default example:
(function(global) {
'use strict';
function definition(demand, provide) {
demand
.configure({
// any option from the previous section
// most likely something like:
pattern: {
},
modules: {
}
});
return true; // just return true if there really is nothing to return
}
provide([ 'demand', 'provide' ], definition);
}(this));
What am I doing wrong?
from qoopido.demand.
Tried different web server - this time https://www.npmjs.com/package/http-server
Started it with command http-server --cors
and now I'm getting this in console:
There is also no sign of app/main.js being loaded.
from qoopido.demand.
@iFarmGolems Thanks for your report! Would you be able to setup a dummy repo with minimal, yet complete code? I know initial setup is a bit hard to deal with but I'll sure help you sort things out ;)
from qoopido.demand.
@iFarmGolems I was able to reproduce the issue I think, no need for a minimal repo from your side. I am looking into it ;)
from qoopido.demand.
@iFarmGolems Found the problem: I forgot to update the README.md with the latest changes regarding path resolution. In your case, simply change your first snippet part to
("dist/demand.js", "./app/main", {
base: "./",
version: "1.0.0",
cache: false,
})`
and it should work.
Explanation:
In the past paths to modules used to be interpreted as being "relative" by default if they where not detected to be absolute. This was lately changed to the opposite to be able to load UMD-compatible libs (and their dependencies) directly without any changes.
I'll update the docs and make that clear.
from qoopido.demand.
Thanks! :)
from qoopido.demand.
@iFarmGolems Happy to help you out! Feel free to contact me directly if you need further assitance or open another issues if you encounter something you think might be a bug ;)
from qoopido.demand.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qoopido.demand.