electron-webpack-quick-start
electron-webpack-quick-start copied to clipboard
vue + typescript ?
Very interesting project, though struggling to get Vue and Typescript working together.
for example renaming index.js
to index.ts
and adding this line:
import App from './view/App.vue'
Results in:
Module not found: Error: Can't resolve 'vue-loader' in '/Users/davem/Documents/electron/e2'
@ ./src/renderer/index.ts 1:0-32
@ multi (webpack)-dev-server/client?http://localhost:9080 webpack/hot/dev-server ./node_modules/electron-webpack/vue-renderer-entry.js ./src/renderer/index.ts
Am guessing that I need to webpack-merge in the vue-loader
though not exactly sure what electron-webpack is providing vs what it expects to have provided in terms off webpack configuration?
An example with Vue and Typescript working would be much appreciated!!
Supposedly you should be able to add electron-webpack-ts
and electron-webpack-vue
to your project, but I have not been able to get it working yet: https://github.com/electron-userland/electron-webpack/issues/264
I managed to get it working by adding a "magic" file that vue-cli generates for typescript projects: shims-vue.d.ts
.
I'd love it somebody could explain to me exactly what it does, but meanwhile, my fork of electron-webpack-quick-start
with working vue + typescript is here:
https://github.com/partap/electron-webpack-quick-start