268 questions
31 votes
2 answers
17k views
What is the difference between module and scoped styles in Vue?
What is the difference between <style module> and <style scoped> in Vue? The official documentation (link1, link2) states only that scoped uses PostCSS transformation and module uses CSS ...
2 votes
2 answers
17k views
Vue3 build error: At least one <template> or <script> is required in a single file component
I try to migrate a large existing codebase from Vue2 to Vue3 using Webpack. So I upgraded the necessary packages in package.json to looks like this (no problems here): "vue": "^3.2.45&...
8 votes
4 answers
5k views
Removing all data-test attributes from Vue templates during production build in Vue 3
I work with Vue3 in TS (last vue-cli). I want to get all nodes (vnodes) elements when vue-loader compile .vue file. I need to read nodes attributes and remove all "data-test". I have try in ...
31 votes
6 answers
24k views
Vue.js style v-html with scoped css
How can I style v-html content with scoped css using vue-loader? Simple example: component.vue <template> <div class="icon" v-html="icon"></icon> </template> <script> ...
0 votes
1 answer
300 views
Syntax Error: TypeError: Cannot read properties of undefined (reading 'styles') When migrating to Vue3
I am currently trying to migrate from Vue2 to Vue3 using migration build. When I try to build the project, the following error occurs: Syntax Error: TypeError: Cannot read properties of undefined (...
44 votes
5 answers
75k views
Vuejs 3 webpack : Problem with vue-template-compiler
I am trying to integrate vuejs 3 to an existing project which uses webpack. I read about vue-loader, so I am trying to use it. In the official documentation I have this: Every time a new version of ...
16 votes
3 answers
63k views
Webpack compile error: TypeError: __WEBPACK_IMPORTED_MODULE_1__ … is not a function
So, this my Api Service Component, I'm using Axios: import api from './Api.vue'; export default { name: 'app-feed-service', methods: { getPosts() { return api.get('posts/'...
148 votes
14 answers
198k views
vue js watch multiple properties with single handler
Currently I have to watch a few properties. And if each of them changes, I have to invoke the same function: export default{ // ...... rest of code watch: { propa: function(after,before) { ...
0 votes
1 answer
247 views
How to use Paged.js in Vue.js2?
let paged = new Previewer(); paged.preview('test', \[\], document.body).then((flow) =\> { console.log("Rendered", flow.total, "pages."); }); Facing issue: 1:1188-1197 export '...
0 votes
0 answers
115 views
i have file csv and separated with semicolon always got errormodule parse failed: unexpected token (2:12)
always show error ERROR in ./public/data-test.csv 2:12 Module parse failed: Unexpected token (2:12) You may need an appropriate loader to handle this file type, currently no loaders are configured to ...
-1 votes
1 answer
509 views
Issue with rendering a component in Laravel Nova after updating dependencies
Hello Stack Overflow community! I'm facing an issue with rendering a component in Laravel Nova after updating dependencies in the project. When trying to open the component in Laravel Nova, I get an ...
1 vote
4 answers
12k views
Removed node modules and now getting 'Error: Cannot find module 'webpack/lib/RuleSet'' error
I have a Vue app in a PHP project using Laravel mix. My app was fine but I just recently deleted my node modules and package lock file. After running npm install again, I am now getting the ...
2 votes
1 answer
3k views
[Vue warn]: Failed to resolve component: swiper-slide and swiper-container when using Swiper Element
I'm using Swiper Element for slide effects in a Vue app, it works fine but I keep getting these two warnings, [Vue warn]: Failed to resolve component: swiper-slide If this is a native custom element, ...
0 votes
1 answer
785 views
Vue template compile error, "Cannot read properties of undefined (reading '_c')"
I'm working on adding a custom tool to an existing Laravel application using Laravel Nova for the admin panel. The auto generated tool that is created with "php artisan nova:tool vendor/name"...
6 votes
4 answers
5k views
Import vue module from another vue module in typescript
Could you please help importing a TypeScript2 Vuejs2 component from another TypeScript2 Vuejs2 component? Target module (MyTable.vue) <script lang="ts"> export default {} </script> ...