Closed LoganDark closed 4 years ago
@LoganDark do you have a TS config file that is generating esm modules?
@phated yes, es5 commonjs
That's the opposite of what I asked. I think you will need to create a repository that shows this problem before anyone can work on it.
That's the opposite of what I asked.
If so I have no idea what you asked. I guess I'll create a repository
Thanks! I don't have webpack installed globally so the sample doesn't work out of the box. I did npm i -D webpack-cli
and then npx webpack
and the example works as expected.
Note that I'm testing in node 10, not 13. So your webpack versions are messed up or stuff doesn't work in unstable node?
Edit: And I just tested in node 13 and it works with my steps above. So it must be your webpack versions.
Why does installing webpack-cli fix the issue?
That is very obscure and just retarded, honestly. webpack
already provides the webpack command, but it's apparently a broken version that doesn't actually work. There's no indication anywhere that I should additionally install webpack-cli
.
Turns out this was not an issue with interpret, sorry.
What were you expecting to happen?
webpack.config.ts is interpreted as ts
What actually happened?
webpack.config.ts is interpreted as js
Terminal output / screenshots
Please provide the following information:
Additional information
dependencies:
all were added via
npm i
I don't think I'm missing anything...