question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V14.5.x Import Typescript file from a jar module

See original GitHub issue

In a multimodule application, I have javascript files in a jar module that can be used.

If I add typescript file in a jar module, I have this error:

  Failed to find the following imports in the `node_modules` tree:
      - @vaadin/flow-frontend/my-test-component.ts

It’s ignored in this class TaskCopyFrontendFiles :

 private static final String[] WILDCARD_INCLUSIONS = new String[] {
           "**/*.js", "**/*.css" };

Is it an intended behavior?

In this branch you can build and see the error: https://github.com/jcgueriaud1/multimodule-spring-vaadin-app/tree/v14_5/ts_in_module

Both files (js and ts) are in the same directory but only the javascript file is taken: https://github.com/jcgueriaud1/multimodule-spring-vaadin-app/tree/v14_5/ts_in_module/ui-module/src/main/resources/META-INF/resources/frontend

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jcgueriaud1commented, Oct 27, 2021

I re-opened the ticket because the project I linked was not working after the fix. I’ve created a new ticket with the same code.

0reactions
mshabarovcommented, Oct 27, 2021

@jcgueriaud1 those webpack issues you experienced are most likely has a different root cause, so I propose to open an another issue and put there your latest observations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Reference External Modules in Typescript - Pluralsight
In this guide, you will learn different ways to import external modules and how to use imported scripts. Ways of Referencing External Modules....
Read more >
Documentation - Modules - TypeScript
Modules are declarative; the relationships between modules are specified in terms of imports and exports at the file level. Modules import one another...
Read more >
import typescript modules from java classpath - Stack Overflow
I want to import a .ts file from a JAR file. I have a file widgets.jar with a lot of .ts files inside...
Read more >
Storing and Loading Resources | Importing JavaScript and ...
All JavaScript modules found on such classes are imported before other file types. This covers both Lumo and Material themes as well as...
Read more >
Typescript file matched NO_CONFIG - IntelliJ Platform
create an empty project and importing the ts project as a module. I was only able to reproduce the issue with the last...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found