-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpacker 3.2.0 and typescript project gives "missing appropriate loader" error #1113
Comments
@corymcdonald Please see the changelog: https://github.com/rails/webpacker/blob/master/CHANGELOG.md#breaking-changes We have moved all loaders to user space so, either you can install it by running the installer or copy the required loaders from https://github.com/rails/webpacker/tree/master/lib/install/loaders |
To generate a new Rails app with typescript support: https://github.com/rails/webpacker#angular-with-typescript |
The loader seemed to work just fine. However i'm not using angular. I think the easiest fix is to just update the documentation for typescript support - One concern that I have is that if someone updates their non-angular project that contains typescript their project will fail to compile and re-running the installers will fail to fix this issue. I'll submit a quick PR to update the documentation. However is there future consideration to adding a typescript installer, similar to |
@corymcdonald Please do 👍 |
I think we should do a typescript installer and make the Angular one dependent on this one, wdyt? @gauravtiwari @corymcdonald |
@guilleiguaran Yeah I was thinking same 👍 |
I'd agree. I'll start working on this. |
I tried to create a new rails/react application with typescript however am running into an issue. I created a new rails application with the following.
rails new myapp --webpack=react
Then I followed the documentation for adding typescript support. Then created a file called
hello.tsx
in theapp/javascript/packs/
directory and copied the basic stateless React component on the typescript language site and received the following output.When I downgrade the webpacker version in the
package.json
file webpack compiles the application successfully with the previously released versions.✅ "@rails/webpacker": "=3.0.2"
✅ "@rails/webpacker": "=3.1.1"
❗️ "@rails/webpacker": "=3.2.0"
The text was updated successfully, but these errors were encountered: