johnsoftek / plugin-jade

Jade loader plugin for jspm
MIT License
13 stars 5 forks source link

jspm 0.17 importing jade shows error #17

Closed giuseppecrj closed 8 years ago

giuseppecrj commented 8 years ago

I'm trying to use the plugin with jspm 0.17.0-beta.13 and I'm getting this error whenever I try to import a file using:

import template from './app.jade'

output:

err Error on translate for myproject/app.jade at file:///Users/g/Desktop/myproject/src/app.jade Loading myproject/app.js TypeError: Cannot read property 'builder' of undefined at file:///Users/g/Desktop/myproject/jspm_packages/github/johnsoftek/plugin-jade@1.1.0/jade.js!transpiled:10:16

This is my jspm.config.js top block configuration.

SystemJS.config({ transpiler: "plugin-babel", packages: { "myproject": { "main": "app.js", "meta": { "*.js": { "loader": "plugin-babel" } } } }, meta: { "*.jade": { "loader": "jade" } } });

Also I don't believe this is in the realm of the plugin itself but is there a way to make watchman catch any changes to the jade files and compile if you're using the new jspm bundle src/app.js -wid command?

If you need any further clarification let me know.

Thank you so much!

jonricaurte commented 8 years ago

@giusepperj This is related to this comment:

https://github.com/johnsoftek/plugin-jade/issues/15#issuecomment-215105688

johnsoftek commented 8 years ago

@giusepperj Try latest version 1.1.1

johnsoftek commented 8 years ago

Fixed, hopefully, in 1.1.2

johnsoftek commented 8 years ago

@giusepperj jspm with -w switch will watch jade files loaded by plugin-jade.

jonricaurte commented 8 years ago

@johnsoftek works for me! Thanks a lot for the quick turn around!

giuseppecrj commented 8 years ago

Yup works for me as well. Thank you for the fast response @johnsoftek