bluewings / pug-as-jsx-loader

MIT License
188 stars 15 forks source link

can't import simple pug templates #33

Closed AutomataVM closed 5 years ago

AutomataVM commented 5 years ago

Every time I tried importing simple pug templates, I get this error:

 react-dom.production.min.js:4408

TypeError: h.a.call is not a function at n.value (App.js:10) at Oo (react-dom.production.min.js:3785) at No (react-dom.production.min.js:3776) at Do (react-dom.production.min.js:3960) at Qi (react-dom.production.min.js:5514) at Ki (react-dom.production.min.js:5536) at Oa (react-dom.production.min.js:5958) at Pa (react-dom.production.min.js:5925) at Ta (react-dom.production.min.js:5860) at Ji (react-dom.production.min.js:5787)

I don't know what the issue is, I already changed the webpack files. and I have this on my app.js;

import React from 'react'; import './App.css'; import { translate} from 'react-multi-lang' import homeTemplate from './views/home.pug'

class App extends React.Component {

render() {

        return homeTemplate.call({}, {
        });
}

}

export default App;

bluewings commented 5 years ago

t seems that you forgot to put pug related rule in webpack.config.prod.js.