Hi,
I am trying to use the Typescript loader. However, the documentation is scarce and I cannot get it to work.
Here are the steps I have done so far :
yarn add ts-loader@^3.0 typescript
In the webpack.config.js :
.addEntry('app', './assets/js/app.tsx')
And I have reduced my file ts file to the strict minimum with a simple console.log
When I run encore, I get the following error :
TS18002: The 'files' list in config file 'tsconfig.json' is empty.
Does that mean I have to explicitly add each ts file I create into the tsconfig.json file?
And I have found out, you can use a glob expression in the tsconfig file as well. I'll open a PR on the symfony documentation to present a sample tsconfig file.
@iammichiel Did you open PR? Documentation is still very basic and encore + typescript does not work outside the box (well, at least tsconfig.js must be created and it does not say that).
Could you share your config with glob expression to load files correctly?
As a matter of fact, I did. The PR is still waiting at the moment.
Most helpful comment
As a matter of fact, I did. The PR is still waiting at the moment.
https://github.com/symfony/symfony-docs/pull/10521