Heroku: Webpack compile process checks other files outside entry list and shows error for those files #18443
Unanswered
ngohuytrieu
asked this question in
Q&A
Replies: 2 comments 1 reply
-
This is typescript error, not webpack, you need to improve your |
Beta Was this translation helpful? Give feedback.
0 replies
-
@alexander-akait It only shows those errors when I run webpack compile command
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug report
What is the current behavior?
Hi guys, I am encountering this error, it is not happening on my local setup but only when I deploy my web app to
heroku
Here is my folder structure
Here is my compile script:
webpack --config webpack-js.config.js --mode=production
Here is my
webpack-config
file:The problem is when I run the above script, it not only compiles
admin.script.ts
file but only checking on other.ts
files outsidesrc/assets/scripts
and shows error for those files, like this:I did try to add exclude
test
folder toexclude: /node_modules|src\/test/
but still not luckI also set file prefix is
.script.ts
(so it would not take all.ts
files) totest: /\.script.ts?$/,
and still not workingIf the current behavior is a bug, please provide the steps to reproduce.
webpack-js.config.js
What is the expected behavior?
Webpack only compiles files in entry list
Other relevant information:
webpack version:
^5.88.2
webpack-cli version:
^5.1.4
Node.js version:
^18.17.0
Operating System:
Heroku
Additional tools:
Beta Was this translation helpful? Give feedback.
All reactions