Open Jeremy-F opened 5 years ago
Ouch !! Yes, I entirely forget to update this plugin after the release of vue cli 3.1. I really think I should act on it soon. Can you give me until Saturday that I look into it. Sorry about your src folder, I hope it’s not too bad.
Don't worry, I solved the problem doing all the configuration manually. (Updating the vue.config.js, and adding a html.d.ts into my project, already using vue-template-loader).
My last commit solved the problem about my src folder, thanks 👍
The bug is still unsolved, warning Installing this version erase the src folder
Hello @m4ss1mog,
I would like to try and fix this bug asap. Would you mind setting up a repo where it is failing?
Thank you in advance
vue create -d -n repro
cd repro\src
touch newcomponent.vue
cd ..
Launch the next command on root directoryvue add template-loader
� Invoking generator for vue-cli-plugin-template-loader... ERROR Error: Cannot find module '@vue/cli-plugin-typescript/generator/template/src/shims.d.ts' from 'D:\temp\repro\node_modules\vue-cli-plugin-template-loader\generator\template\src' Error: Cannot find module '@vue/cli-plugin-typescript/generator/template/src/shims.d.ts' from 'D:\temp\repro\node_modules\vue-cli-plugin-template-loader\generator\template\src' at Function.resolveSync [as sync] (C:\Users\massimo\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\resolve\lib\sync.js:81:15) at renderFile (C:\Users\massimo\AppData\Roaming\npm\node_modules\@vue\cli\lib\GeneratorAPI.js:440:17) at _injectFileMiddleware (C:\Users\massimo\AppData\Roaming\npm\node_modules\@vue\cli\lib\GeneratorAPI.js:246:27) at process._tickCallback (internal/process/next_tick.js:68:7)
The src folder is erased
I should probably check that vue/cli-plugin-typescript is already installed before I start invoking the plugin. That is a big bug indeed.
Regarding the empty src folder, what would you expect an empty newcomponent.vue
to transform into?
What should I put in the resulting js, css and html files?
Regarding the empty src folder, what would you expect an empty
newcomponent.vue
to transform into? What should I put in the resulting js, css and html files?
In this case is only a placeholder to show you that installing the plugin delete the src folder, nothing more.
This issue should be fixed in v1.0.1
Versions :
Result of :
vue add template-loader
And all my src directory has been deleted.