Make dep-graph logic extensible
See original GitHub issueCurrent Behavior
The dep-graph logic is not extensible by plugins.
The dep-graph logic was refactored to be more extensible but has not been made it public yet.
Expected Behavior
The dep-graph logic is extensible by plugins by providing hooks that would analyze files for their dependencies.
Notes
The dep-graph is extensible enough to handle different languages such as .NET
and Java
. If somebody from the community is interested in maintaining these kinds of plugins for Nx, please join us in the Community Slack to discuss what would be expected.
Original Description
Please make sure you have read the submission guidelines before posting an issue
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- I am running the latest version
- I checked the documentation (nx.dev) and found no answer
- I checked to make sure that this issue has not already been filed
- I’m reporting the issue to the correct repository (not related to React, Angular or any dependency)
Expected Behavior
I managed to integrate some Vue applications inside a newly created NX monorepo. I have 2 Vue apps depending on a lib: they both import a Vue component (layout.vue) from it.
Is there a way to extend the TypeScriptImportLocator
class to change the file extensions, or pass in some argument?
Current Behavior
When I run nx dep-graph
, the link between the lib and the projects doesn’t appear, because it doesn’t parse .vue
files.
Failure Information (for bugs)
By just adding extension !== '.vue' &&
into the “if” clause in this file, it works like a charm! But it’s really tempering with the node modules, and i’d rather not.
Generated graph with the hack:
Steps to Reproduce
I cannot easily share a repo with the issue, since it’s an internal project in my company.
Context
Please provide any relevant information about your setup:
@nrwl/angular : Not Found
@nrwl/cli : 9.2.2
@nrwl/cypress : 9.2.2
@nrwl/eslint-plugin-nx : 9.2.2
@nrwl/express : Not Found
@nrwl/jest : 9.2.2
@nrwl/linter : 9.2.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 9.2.2
@nrwl/web : 9.2.2
@nrwl/workspace : 9.2.2
typescript : 3.8.3
I’m using latest Vue 2.x, with some plugins (even though it’s not related):
- @vue/cli-plugin-typescript’
- @vue/cli-plugin-router’
- @vue/cli-plugin-vuex’
- @vue/cli-plugin-eslint’
- @vue/cli-plugin-unit-jest
Failure Logs
It doesn’t fail explicitly. It just ignores vue files.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:274
- Comments:17 (4 by maintainers)
Keep this active!
Bump!