million
million copied to clipboard
bug: Typescript files are not being compiled, when I add million.webpack() to my webpack 5 configuration
Describe the bug When I add million.webpack() to my webpack configuration, typescript files are not being compiled. I have followed the suggestion in the docs, and changed all of my interfaces to types. *.d.ts files generate
When I comment out the *.d.ts files, I get the first TypeScript error
To Reproduce Steps to reproduce the behavior:
- Add million.js to package.json
- Import the million compiler into webpack.config
using const million = require("million/compiler");
- add million.compiler to the plugins array in webpack
plugins: [ million.webpack() ]
}
- compile the project with
yarn dev
Expected behavior TypeScript files are transpiled, and the app is launced successfully
Screenshots Added above
Device (please complete the following information): -Windows 11
- Browser: chrome, msedge, firefox. But the project does not compile so this is moot
- Versions:
"million": "^2.4.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.14.1",
"typescript": "^5.1.6",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",
I hope this is me missing something and it's a simple fix on how I've set things up on my end.
Removing million.compiler from the webpack configuration, the project compiles and works in the browser successfully.
Having a similar problem using vite and TS here
Having a similar problem using vite and TS here
Hmm, thank you very much @TerrySlack and @lucasluca. We'll have a look at this and let you know very soon what could be causing it.
Just released a fix @TerrySlack and @lucasluca, please retry with 2.5.0
. If the issue is fixed, would be awesome if you closed the issue. Otherwise, ping me again
Hi @aidenybai
Sorry for the delay. tried with both v2.5.0 and latest which installed 2.5.2-beta.0 and get the following errors.
As mentioned above, using windows 11, VS Code and:
"million": "^2.5.2-beta.0",
"typescript": "^5.1.6",
"webpack": "^5.88.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1",