E
E
elyourn2016-07-11 17:08:24
JavaScript
elyourn, 2016-07-11 17:08:24

How to organize React + Jade interaction?

Module: https://www.npmjs.com/package/react-pug
When trying to import:
import pug from "react-pug";
Error:


ERROR in ./~/static-module/~/escodegen/package.json
Module parse failed: node_modules/static-module/node_modules/escodegen/package.json Unexpected token (2:9)
You may need an appropriate loader to handle this filetype.

Module: https://github.com/nw/react-jade-loader
import template from "template.jade";
render() {
return template();
}

I get string from jade template, but I can't figure out how to pass variables to jade. The replacement doesn't work.
How to organize the right interaction?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Izmailov, 2016-07-11
@WapGeaR

Your collector is not configured. He doesn't know what jade is.
If webpack, then look for jade-webpack-loader

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question