- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 433
ts-loader cannot accept *.js file as an entry point although allowJs
parameter is set to true
#163
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
Comments
Yup I have the same problem :( |
Will try to address this in the next release. |
Btw, the js files included via |
What is the timeline for the next release? |
Any news on this? |
Wondering if there are any updates or if anyone has found a workaround for this in the interim? |
@dwasyluk I believe this should've been fixed in 0.9.3. Can you please try that version? |
Yes this should be fine now I hope. Closing for now. |
I can't get it to work. |
You need to set the |
We are using these compiler options: https://www.typescriptlang.org/docs/handbook/compiler-options.html What you are describing isn't there. I'm using Visual Studio 2015 and it wont include the js files with the ts. But if I compile it with gulp-typescript, it works. I see now that this thread is about ts-loader... I'm moving on. |
Make sure you are using 1.3.0
Right... This is webpack - if that's not what you're after we can't help |
@johnnyreilly since the |
@johnnyreilly sorry, I just re-read the issue, |
No worries! |
If you specify any
*.js
file as an entry point inside the webpack configuration, ts-loader will throw an error (Module build failed: Error: Could not find file: ...).I think this is ts-loader issue because TypeScript 1.8.0 and greater can transpile JavaScript files and import them. You have to set
allowJs
property totrue
to get this functionality working. Simply run the following code to test this.For ts-loader, it seems that just an entry point must be always a
*.ts
file. Inside the entry module you actually are allowed to import and use both es6 and ts files.The text was updated successfully, but these errors were encountered: