Closed mizok closed 2 years ago
@mizok Did I understand #16 correctly that you can include ejs files, but they are not recognized as webpack dependencies? If so, does this solution update the webpack dependencies?
@dc7290 I guess you missed this?
devServer: {
watchFiles: ['*.html', 'src/template/*.html', '*.ejs', 'src/template/*.ejs','src/template/**/*.ejs'], // this is important
},
You will have to watch all your file if that is gonna be dependency
@mizok Did I understand #16 correctly that you can include ejs files, but they are not recognized as webpack dependencies? If so, does this solution update the webpack dependencies?
@dc7290
Yes, you understood correctly.
And about your second question, you can check my change , I thought I did add
this.addDependency(parsedPath);
I guess it's line 93 or some what :/
@mizok
If so, does this solution update the webpack dependencies?
Yap ,it does.
@mizok
I'm impressed!
The idea of using customIncluder
as a way to add dependencies to webpack was an eye opener.
As for the code formatting, I would like to see a slight modification, so please just do that.
@mizok Try running the following command again.
yarn
Then husky
will be installed and will automatically lint and format the file before committing it.
@mizok Try running the following command again.
yarn
Then
husky
will be installed and will automatically lint and format the file before committing it.
ok sure :D
@dc7290
OK, I guess the lint things are done already, just check it.
@mizok Nice!
Description
@dc7290
I tried the solution I mentioned in #16 (using customized
includer
function). And things seem to work without problem(I am not very sure if this will cause any side effect or problem, 'cause I still don't have time for a full-test.)but THIS did work: result:
And bc it is gonna be a big change(if you think this solution is ok), I guess it should be checked carefully.
fix #16
Type of change
Bug fix I guess.
How Has This Been Tested?
I forked this repo, change
index.ts
then runbuild
, then copy paste all the built library to thenode_modules
in my testing repo.Checklist: