kirbysayshi / vash

Vash, the 60 billion double-dollar template-maker. Razor syntax, for JavaScript templates
Other
522 stars 60 forks source link

the extra define call confused requirejs's r.js optimizer #52

Closed normanzb closed 9 years ago

normanzb commented 9 years ago

https://github.com/kirbysayshi/vash/blob/master/src/vruntime.js#L9

why there are an extra call into define(), it seems this one confuses r.js, and as a consequence, the correct module path won't be added to the generated.js

kirbysayshi commented 9 years ago

There's only one define call in the built vash file: https://github.com/kirbysayshi/vash/blob/d26b1ef19c048cc5037da2822adf13f9ac2934f5/build/vash.js#L1499. Are you requiring vash or are you requiring a file within the vash package, such as vruntime?

In the next version of vash I'll be removing the UMD wrapper from the built version, so you should be able to use whatever shim RequireJS provides these days to consume a CJS package instead. And in fact, if you want to try this, you can use the beta version of vash I just published: npm install vash@beta

kirbysayshi commented 9 years ago

v0.8.0 of vash has been released, so this shouldn't be an issue any more. You will need to update whatever requirejs config you use, as define has been removed from vash completely.