Closed hwuethrich closed 9 years ago
Hi, @hwuethrich. The runtime.js
would only be used in cases where jade templates are being rendered client-side. I wonder if there is a way to get the plugin to not include runtime.js
when no client-side / JS templates are being used.
The fact that it causes an error isn't very good, though. I wonder if that is an issue in jade itself. I will look into it a bit more later. Thank you so much for letting me know about this issue!
@hwuethrich I've posted an issue on jade about this and am waiting a follow-up from them. Will keep this thread updated.
@hwuethrich @teddybradford I've pushed a solution to this, so feel free to open the issue again if version 1.7.13 doesn't solve the problem.
@monokrome Thanks for the quick fix! It's working now. :+1:
Hooray! :D
I'm using this plugin to generate static html files (not javascript templates). After upgrading this plugin to the latest version (1.7.11), I noticed the following error in the browser console:
The error is caused by the included
node_modules/jade/lib/runtime.js
, which assumes a globalexports
object.Versions prior to commit 1ad5891ba56e979d62b29ce0f0443f0346d9f6fc (<1.7.8) were including the file
node_modules/jade/runtime.js
, which uses a wrapper that definesexports
if not present.The underlying problem results from different versions of
jade
and usingrequire.resolve('jade')
to calculate the path ofruntime.js
:.../node_modules/jade/index.js
.../node_modules/jade/lib/index.js
I don't know if this change was intentional. I was able to workaround this problem by ignoring this file in the brunch config (which is not needed in my case):
Hope this helps! :)