You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not really sure if this is a bug or a feature request. I suspect feature request and the second part of this ticket is some weird side effect.
I am following the patterns laid out in the https://github.com/universal-vue/examples repository but trying to write it in TS. I'm able to write almost all aspects of my app in src/ as Typescript except src/server plugins.
When I try to include a typescript file in the server.config.js and serve the app I get the following error
However, if I append the file extension to server.config.js
// server.config.jsimport{ExpressAdapter}from"@uvue/server";exportdefault{adapter: ExpressAdapter,plugins: ["@uvue/server/plugins/gzip","@uvue/server/plugins/serverError","@uvue/server/plugins/static","@uvue/server/plugins/modernBuild","./src/server/apiPlugin.ts",// <-- suffix added so it can detected],};
It is able to detect the file but now it cannot find any imported files and I have to append the suffix to those as well
// src/server/apiPlugin.tsimportapifrom"./api.ts";// <--- suffix added so it can detectedexportdefault{install(server){api(server);},};
The plugin gets installed and appears to work, However the Typescript compiler is not very happy about the inclusion of the .ts extension in the import.
An import path cannot end with a '.ts' extension. Consider importing './api' instead.ts(2691)
The text was updated successfully, but these errors were encountered:
I am not really sure if this is a bug or a feature request. I suspect feature request and the second part of this ticket is some weird side effect.
I am following the patterns laid out in the https://github.com/universal-vue/examples repository but trying to write it in TS. I'm able to write almost all aspects of my app in
src/
as Typescript exceptsrc/server
plugins.When I try to include a typescript file in the
server.config.js
and serve the app I get the following errorHowever, if I append the file extension to
server.config.js
It is able to detect the file but now it cannot find any imported files and I have to append the suffix to those as well
The plugin gets installed and appears to work, However the Typescript compiler is not very happy about the inclusion of the
.ts
extension in the import.An import path cannot end with a '.ts' extension. Consider importing './api' instead.ts(2691)
The text was updated successfully, but these errors were encountered: