Typescript correctly imports thetippy.js package. RequireJS instead consider "tippy.js" a JavaScript file and refuses to map it to another file to be loaded instead.
Besides looking at RequireJS and/or Typescript for a solution, could the package name be changed to something more standard like "tippyjs" or "tippy-js"?
Reproduction
My typescript module contains: import tippy from "tippy.js"; Compiling it with module: "amd" correctly generates:
define(["require", "exports", "tippy.js"], function (require, exports, tippy_js_1) { ...
But at runtime the loading fails because RequireJS tries to load the non-existent JavaScript file "tippy.js" from the server root instead of looking at the RequireJS path mapping: "tippy.js": "../node_modules/tippy.js/dist/tippy-bundle.umd".
Bug description
Typescript correctly imports the
tippy.js
package. RequireJS instead consider "tippy.js" a JavaScript file and refuses to map it to another file to be loaded instead.Besides looking at RequireJS and/or Typescript for a solution, could the package name be changed to something more standard like "tippyjs" or "tippy-js"?
Reproduction
My typescript module contains:
import tippy from "tippy.js";
Compiling it withmodule: "amd"
correctly generates:But at runtime the loading fails because RequireJS tries to load the non-existent JavaScript file "tippy.js" from the server root instead of looking at the RequireJS path mapping:
"tippy.js": "../node_modules/tippy.js/dist/tippy-bundle.umd"
.