-
Notifications
You must be signed in to change notification settings - Fork 751
Closed
Description
I was wondering if it is possible to use typescript with this gem.
I do not have the config/wepback/loaders
folder, but I do have config/weback/evironment.js
to which I tried adding a typescript loader like so:
const { environment } = require('@rails/webpacker')
environment.loaders.set('typescript', {
test: /.(ts|tsx)$/,
loader: 'ts-loader'
});
module.exports = environment
Apart from adding this to my config/weback/evironment.js
, I also ran yarn add ts-loader typescript @types/react @types/react-dom
and added a tsconfig.json
file.
This process did didn't seem to work, so I was wondering if I am missing a step or if it's even possible.
Thanks!