ThisNameWasTaken / ejs-plain-loader

MIT License
3 stars 1 forks source link

fixed to correspond variety of include syntex formats #7

Open yabe-diverta opened 4 years ago

yabe-diverta commented 4 years ago

Hi.

I found a bug of include syntax usage, that is like following: <%- include('partial/partial_example.ejs', { var: 'test' }) %> as single line.

With above, webpack will dump an error for detecting a malformed requiring.

Html Webpack Plugin:
  Error: Child compilation failed:
  Module build failed (from ./node_modules/ejs-plain-loader/lib/index.js):
  Error: ENOENT: no such file or directory, open '/Users/yabe/workspace/front_app/ejs/src/ejs/partial/partial_exampl  e.ejs', { var1: 'passed argument.ejs'

  - index.js:22 addDependencies
    [ejs]/[ejs-plain-loader]/lib/index.js:22:32

...

This is due to dependencyPattern lib used. Please check test i edited.

ofcource multiple lines had worked well, such as in the description in readme.