Closed roryprimrose closed 7 years ago
I think this is the same issue as https://github.com/HerringtonDarkholme/vue-ts-loader/issues/1?
Use
<script>
import component from './file.ts';
export default component;
</script>
or use another loader like awesome-ts-loader
.
Thanks @digitalheir, I used that import export workaround and the appendTsSuffixTo: [/\.vue$/]
config. This now works with external ts files.
One thing I noticed was that this is all or nothing. You can't have vue files that do not have external ts files anymore. Not really a problem as that was the intention, but could trip people up.
Is there a way to support Src imports?
For example, I have index.html
This is served with index.ts
I have broken up app.vue into src files:
Webpack contains the following log:
If I only use the template in the external file then everything is good. Is this supported? Are there any workarounds?
Cheers