Giter VIP home page Giter VIP logo

Comments (7)

iFarmGolems avatar iFarmGolems commented on May 21, 2024

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.

iFarmGolems avatar iFarmGolems commented on May 21, 2024

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:

image

There is also no sign of app/main.js being loaded.

from qoopido.demand.

dlueth avatar dlueth commented on May 21, 2024

@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.

dlueth avatar dlueth commented on May 21, 2024

@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.

dlueth avatar dlueth commented on May 21, 2024

@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.

iFarmGolems avatar iFarmGolems commented on May 21, 2024

Thanks! :)

from qoopido.demand.

dlueth avatar dlueth commented on May 21, 2024

@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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.