Closed thewebartisan7 closed 2 years ago
Checking source code seem that here is the problem:
const filePath = path.join(path.isAbsolute(href) ? options.root : path.dirname(options.from), href);
The href
must have a starting slash like /path/to/module.html
otherwise path.isAbsolute(href)
will return false.
So root must not have slash, example:
root: './src/templates',
When I try to set from like:
from: __dirname + '/src/templates/',
Then root become ./src/
and not ./src/templates/
then I need to include module using also templates
example templates/path/to/module.html
Root in this case is ignored.
Would be to review below, like other extends and include. I am not sure why there is both root and from.
const filePath = path.join(path.isAbsolute(href) ? options.root : options.from, href);
Anyway solved.
In my webpack I have set root, but it's completely ignored, and only adding full path works fine. The root path is set also for extends and includes module and works fine.
This is my webpack: