Answer the question
In order to leave comments, you need to log in
How to make bemto & pug friends?
bemto is installed in node_modules and is included in the project using webpack. But an error is thrown:
ERROR in Error: Child compilation failed:
Module build failed: Error: Cannot resolve 'file' or 'directory' ./helpers.pug in D:\Projects\nogai-history\node_modules\bemto.jade\lib
- Resolver.js:124
[nogai-history]/[enhanced-resolve]/lib/Resolver.js:124:15
- Resolver.js:191
[nogai-history]/[enhanced-resolve]/lib/Resolver.js:191:15
- Resolver.js:110 applyPluginsParallelBailResult.createInnerCallback.log
[nogai-history]/[enhanced-resolve]/lib/Resolver.js:110:4
и т.д...
include helpers
include ~bemto.jade
body
+b.header
+e.search Test
var BowerWebpackPlugin = require('bower-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './app/main',
output: {
path: __dirname + '/dist',
filename: 'script.js'
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel?presets[]=es2015'
},
{
test: /\.(pug|jade)/,
loader: 'pug'
}
]
},
plugins: [
new BowerWebpackPlugin(),
new HtmlWebpackPlugin({
template: './app/main.jade',
filename: 'index.html'
})
]
};
Answer the question
In order to leave comments, you need to log in
Either rename files to node_modules/bemto.jade/lib/*.jade -> *.pug,
or add .pug extension to include's -> include helpers.pug
---
In general https://github.com/kizu/ bemto/issues/81
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question