We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d03c50f commit 67f26a5Copy full SHA for 67f26a5
1 file changed
packages/ink/src/compiler/Component.ts
@@ -207,7 +207,14 @@ export default class Component {
207
* is fixed length.
208
*/
209
public get id() {
210
- return serialize(this.relative);
+ //get the relative path
211
+ let relative = this.relative;
212
+ //if this is a node modules
213
+ if (relative.includes('node_modules/')) {
214
+ //remove the left side of the path
215
+ relative = relative.split('node_modules/')[1];
216
+ }
217
+ return serialize(relative);
218
}
219
220
/**
@@ -306,7 +313,7 @@ export default class Component {
306
313
307
314
308
315
309
- * Returns the source code
316
+ * Returns the original source path
310
317
311
318
public get source() {
312
319
return this._source;
0 commit comments