Not working when building as library
See original GitHub issueI have a setup with the default Vue.js CLI 3 installed and this plugin, no modifications. I would like to generate a library using this script from the package.json
file:
"build-bundle": "vue-cli-service build --target lib --name CreationConfigurator"
When I load the generated demo.html file in my browser is says:
vue.js:597 [Vue warn]: Error in render: "TypeError: _vm.$t is not a function"
Is it possible to make this plugin compatible with the build target for libraries? Or tell me how to fix this issue!
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why do I get errors when I link to a library, but not when I build ...
I'm working on an external module for a c++ library (ITK), which I'm building with cmake and make (I'm on an Ubuntu VM)....
Read more >ng build --watch does not work when building a library #11617
Library project will build automatically whenever any of it's files change. Mention any other details that might be useful.
Read more >Xcode 11.4 : Building for iOS Simu… | Apple Developer Forums
In Xode 11.4, I encounter a failure in my project. When running my project, it was successfull in Xcode 11.3. Now in Xcode...
Read more >Building your own Android library - CodePath Cliffnotes
Building your own Android library enables other developers to take advantage of code that you've written. You can share existing activities, services, images, ......
Read more >Building an Angular Library with multiple entry points | Articles
We'll build a new Angular library from scratch, add multiple subentry points with ... The bad news is that this will not work...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I found the reason: by default in
--target lib
mode, the entry point for the library is.src/App.vue
. ButvueI18n
is referenced in themain.js
file. So you need to specify the js file as the entry point. For example:No need to edit the
vue.config.js
file.Sorry, @TorusHelm, I didn’t understand the question. Check the docs on what’s the difference between different
target
s 😉https://cli.vuejs.org/guide/build-targets.html#library