The linter currently doesn't use a separate recommendation for ESM preloads:
|
: this.warn('<link href=https://cdn.ampproject.org/v0.js rel=preload> is missing'); |
This is misleading, and might even lead to frustration if users blindly apply the recommendation and it doesn't solve the issue.
The linter should properly differentiate between:
.js with rel=preload
.mjs with rel=preload
.mjs with rel=modulepreload
The recommendation should then be generated accordingly so that applying the recommendation verbatim will actually fix the shown issue.
The linter currently doesn't use a separate recommendation for ESM preloads:
amp-toolbox/packages/linter/src/rules/RuntimeIsPreloaded.ts
Line 13 in 153d76b
This is misleading, and might even lead to frustration if users blindly apply the recommendation and it doesn't solve the issue.
The linter should properly differentiate between:
.jswithrel=preload.mjswithrel=preload.mjswithrel=modulepreloadThe recommendation should then be generated accordingly so that applying the recommendation verbatim will actually fix the shown issue.