linkedin / linkedin/dustjs

Dustjs incompatible with almond

Open
#742 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
2.9k
Forks
461
PR merge metrics
No merged PRs in 30d

Description

When upgraded from 2.5 to 2.7 dustjs is supposed to support AMD without shim or other wrappers.

When I load the script dynamically it works fine. When I build a minified version and run it with almond, I get the error:

`... missing dust`

Here is the code I am running:

``` js
...
paths: {
"dust": "/bower_components/dustjs-linkedin/dist/dust-full.min",
...
define(function(require, exports, module) {
require(["dust"], function(dust) {
console.log("DUST IS ", dust)
});
});
```

and I build it with r.js and almond:

``` js
name: "../../bower_components/almond/almond",
```

Here is almond:
- https://github.com/requirejs/almond

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dustjs 2.7 AMD build and the r.js configuration using almond, then compare the dynamically loaded script with the minified build that reports `missing dust`. Reproduce the failure with the shown `paths` and `define` snippets; done means the almond-built version loads dust successfully without a shim or wrapper.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.