Software
Vue 2 + Vuex: Using state variables in computed property
I have a Vuex instance with a couple variables:
const store = new Vuex.Store({ state: { start_date: moment().startOf('year').format("MM/DD/YYYY"), end_date: moment().format("MM/DD/YYYY") }, mutations: { changeDate(state, date_obj) { state.start_date = date_obj.start_date state.end_date = date_obj.end_date } } })and I have my main Vue instance where the date properties are inherited from the store:
var employees = new Vue({ el: '#employees', computed: { start_date() { return store.state.start_date }, end_date() { return store.state.end_date }, leads() { let filter_obj = { start_date: this.start_date, end_date: this.end_date } return this.fetch('potential_clients', filter_obj) } }, methods: { fetch(model, args=null) { return new Promise((resolve, reject) => { console.log(resolve, reject) let url = "/" + model + ".json" console.log(url); $.ajax({ url: url, data: args, success: ((res) => { console.log(res) this[model] = res; resolve(res) }), error: ((res) => { reject(res) }), complete: (() => {}) }) }) } }, mounted() { this.fetch('potential_clients') } });and I initially call this.fetch('potential_clients') without any extra arguments, however once the value for start_date and end_date are changed, I want to call something like leads() above. However nothing changes when I change the values of start_date and end_date.
It might be worth noting that when I inspect in Chrome with the Vue plugin, and click on the root component, all of a sudden the changes show in the view? very odd
Pass data to a store?
How can I pass data from my vue component into a store?
Here's my component:
methods: { ...mapActions('NavBar', [ 'fix', ]), onClick: function() { this.fix('my-data'); }, ....And on the store:
actions: { fix: ({ commit }) => { //get data here? }, },Extend vueJs directive v-on:click
I'm new on VUEjs, I'm trying to create my first app. Now I would show confirm message after every click on buttons. Example:
<button class="btn btn-danger" v-on:click="reject(proposal)">reject</button>My question is: Can I extends v-on:click event To show the confirm everywhere? Example I would make my custom directive called: v-confirm-click that first execute confirm and then if I click on "ok" execute click event, It's possible?
Reactive javascript template [on hold]
I was wondering how you would make a javascript template like this reactive:
<div>Hello {{ name }}!</div>I know about how to observe a property using Object.defineProperty -> get() to listen to changes, but I wonder how to make this reactive. Lets say I get notified of a change for the name variable, and I want to update the div, it doesn't work to put node.textContent = app.data.name; for example because then I would remove the Hello ! part. How do frameworks like angular and vuejs manage this?
How to limit the scope of a Vue.js component's style?
I am experimenting with single file .vue components and my first successful build surprised me with the scope of the component style. Generally speaking, I was under the impression that single file components would be self-contained, including the scope of their components.
The component .vue file is
<template> <div> Hello {{who}} </div> </template> <script> module.exports = { data: function () { return { who: "John" } } } </script> <style> div { color: white; background-color: blue; } </style>It is built via webpackthough the following webpack.config.js
module.exports = { entry: './entry.js', output: { filename: 'bundle.js' }, devServer: { inline: true }, module: { rules: [{ test: /\.vue$/, loader: 'vue-loader' }] } }and the entry.js
import Vue from 'vue/dist/vue.js' import ComponentOne from './component1.vue' //Vue.component('component-one', ComponentOne) new Vue({ el: "#time", data: { greetings: "bonjour" }, components: { ComponentOne } })The HTML file binding all together is
<!DOCTYPE html> <html lang="en"> <body> Greetings: <div id="time"> {{greetings}} <component-one></component-one> </div> <script src='bundle.js'></script> </body> </html>The rendered result is
The style definitions from component-one for div are also applied to the parent div (with id=time). Is this expected behaviour? Shouldn't the styling be confined to the component?
Note: I can assign an id to the div in my component's template and would therefore contain the styling - my question is about why this behaviour is expected in the context of components self-containement.
Vuejs in production: prefix static path
I'm building a VueJS app and I would like to push it in production. I've generated files using npm run build and I've uploaded those on a server (IIS).
I have a lot of other applications on this server and I can't change how it works.
Here is a fake example to help me explain my issue:
mydomain.com/app1 will redirect to a web-app under a folder app1. To add my VueJS project I've created a new folder - lets say vueapp - and I get access it via mydomain.com/vueapp.
The thing is : the static paths generated by vue are not prefixed by vueapp. Paths in index.html are not like I want : I get mydomain.com/static/** instead of mydomaim.com/vueapp/static/** for a vue request.
I would like to tell webpack to prefix index.html's path by something but I can't get it work.
assetsSubDirectoryconfig/build.js gives us the possibility to change the assets sub directory (which is static by default). So I can set it to vueappPrefix/static but of course, this doesn't work.
- expected: mydomain.com/vueapp/vueappPrefix/static/*
- what I get: mydomain.com/vueappPrefix/static
This is obvious.
Of course I can edit index.html by hand or add a script to do it but I would like to know if there is a cleaner way to do this.
Thanks a lot.
Child Component not updating when parent updates vuejs
I have a vue instance that passes an object to a child component. The child component has a checkbox that when clicked calls an event that the vue instance handles to update the object on the parent that is passed to the child component. Based on the vue documentation I thought this would cause the child component to update the related fields. However, the date field is not updating as I would expect when I click on the checkbox. In the image below, when I check the Management Name checkbox, I would expect the current day to appear, but I am not seeing any date. What am I missing here?
Design Parent Instance new Vue({ el: "#evaluations-app", data: { evaluation: new Evaluation() }, methods: { updateEmployeeSO: function (newSO, newSODate) { this.evaluation.EmployeeSO = newSO; this.evaluation.EmployeeSODate = newSODate; }, updateReviewerSO: function (newSO, newSODate) { this.evaluation.ReviewerSO = newSO; this.evaluation.ReviewerSODate = newSODate; }, updateManagementSO: function (newSO, newSODate) { this.evaluation.ManagementSO = newSO; this.evaluation.ManagementSODate = newSODate; } }); Child Component Vue.component('sign-off', { props: ['initEvaluation', 'perspective'], template: ` <div class="sign-off-comp"> <div class="sign-off-item"> <div class="sign-off-field-1 col-1">{{evaluation.EmployeeName}}</div> <input :disabled="!enableEmployeeSO" v-model="evaluation.EmployeeSO" class="sign-off-field-2 col-2" type="checkbox" @click="EmployeeSOChanged"/> <div class="sign-off-field-3 col-3">{{employeeSODate}}</div> </div> <div class="sign-off-item"> <div class="sign-off-field-1 col-1">{{evaluation.ReviewerName}}</div> <input :disabled="!enableReviewerSO" v-model="evaluation.ReviewerSO" class="sign-off-field-2 col-2" type="checkbox" @click="ReviewerSOChanged"/> <div class="sign-off-field-3 col-3">{{reviewerSODate}}</div> </div> <div class="sign-off-item"> <div class="sign-off-field-1 col-1">{{evaluation.ManagementName}}</div> <input :disabled="!enableManagementSO" v-model="evaluation.ManagementSO" class="sign-off-field-2 col-2" type="checkbox" @click="ManagementSOChanged"/> <div class="sign-off-field-3 col-3">{{managementSODate}}</div> </div> </div> `, data: function () { return { evaluation: this.initEvaluation, employeeClicked: false, reviewerClicked: false, managementClicked: false, currentCommentSource: this.perspective } }, methods: { EmployeeSOChanged: function () { this.employeeClicked = true; //this.evaluation.EmployeeSODate == null || this.evaluation.EmployeeSODate == "" ? this.evaluation.EmployeeSODate = Helpers.getCurrentDate() : this.evaluation.EmployeeSODate = ""; this.$emit('employee-so-changed', this.evaluation.EmployeeSO, this.evaluation.EmployeeSODate); }, ReviewerSOChanged: function () { this.reviewerClicked = true; //this.evaluation.ReviewerSODate == null || this.evaluation.ReviewerSODate == "" ? this.evaluation.ReviewerSODate = Helpers.getCurrentDate() : this.evaluation.ReviewerSODate = ""; this.$emit('reviewer-so-changed', this.evaluation.ReviewerSO, this.evaluation.ReviewerSODate); }, ManagementSOChanged: function () { this.managementClicked = true; //this.evaluation.ManagementSODate == null || this.evaluation.ManagementSODate == "" ? this.evaluation.ManagementSODate = Helpers.getCurrentDate() : this.evaluation.ManagementSODate = ""; this.$emit('management-so-changed', this.evaluation.ManagementSO, this.evaluation.ManagementSODate == null || this.evaluation.ManagementSODate == "" ? Helpers.getCurrentDate() : ""); } }, computed: { enableEmployeeSO: function () { return (this.perspective == "Employee" && !this.evaluation.EmployeeSO) || this.employeeClicked; }, enableReviewerSO: function () { return (this.perspective == "Reviewer" && !this.evaluation.ReviewerSO && this.evaluation.EmployeeSO) || this.reviewerClicked; }, enableManagementSO: function () { return (this.perspective == "Management" && !this.evaluation.ManagementSO && this.evaluation.ReviewerSO && this.evaluation.EmployeeSO) || this.managementClicked; }, employeeSODate: function () { return this.evaluation.EmployeeSODate != null && this.evaluation.EmployeeSODate == new Date("01-01-1900") ? "" : this.evaluation.EmployeeSODate != null && this.evaluation.EmployeeSODate.length >= 10 ? this.evaluation.EmployeeSODate.substring(0, 10) : this.evaluation.EmployeeSODate; }, reviewerSODate: function () { return this.evaluation.ReviewerSODate != null && this.evaluation.ReviewerSODate == new Date("01-01-1900") ? "" : this.evaluation.ReviewerSODate != null && this.evaluation.ReviewerSODate.length >= 10 ? this.evaluation.ReviewerSODate.substring(0, 10) : this.evaluation.ReviewerSODate; }, managementSODate: function () { return this.evaluation.ManagementSODate != null && this.evaluation.ManagementSODate == new Date("01-01-1900") ? "" : this.evaluation.ManagementSODate != null && this.evaluation.ManagementSODate.length >= 10 ? this.evaluation.ManagementSODate.substring(0, 10) : this.evaluation.ManagementSODate; } } }); Model export class Evaluation { private _EmployeeName: string; private _EmployeeSO: boolean; private _EmployeeSODate: Date; private _ReviewerName: string; private _ReviewerSO: boolean; private _ReviewerSODate: Date; private _ManagementReviewerName: string; private _ManagementReviewerSO: boolean; private _ManagementReviewerSODate: Date; constructor() { this._EmployeeName = ""; this._EmployeeSO = false; this._EmployeeSODate = new Date("01-01-1900"); this._ReviewerName = ""; this._ReviewerSO = false; this._ReviewerSODate = new Date("01-01-1900"); this._ManagementReviewerName = ""; this._ManagementReviewerSO = false; this._ManagementReviewerSODate = new Date("01-01-1900"); } get EmployeeName(): string { return this._EmployeeName; } set EmployeeName(employeeName: string) { if (this._EmployeeName != employeeName) { this._EmployeeName = employeeName; } } get EmployeeSO(): boolean { return this._EmployeeSO; } set EmployeeSO(employeeSO: boolean) { if (this._EmployeeSO != employeeSO) { this._EmployeeSO = employeeSO; } } get EmployeeSODate(): Date { return this._EmployeeSODate; } set EmployeeSODate(employeeSODate: Date) { if (this._EmployeeSODate != employeeSODate) { this._EmployeeSODate = employeeSODate; } } get ReviewerName(): string { return this._ReviewerName; } set ReviewerName(reviewerName: string) { if (this._ReviewerName != reviewerName) { this._ReviewerName = reviewerName; } } get ReviewerSO(): boolean { return this._ReviewerSO; } set ReviewerSO(reviewerSO: boolean) { if (this._ReviewerSO != reviewerSO) { this._ReviewerSO = reviewerSO; } } get ReviewerSODate(): Date { return this._ReviewerSODate; } set ReviewerSODate(reviewerSODate: Date) { if (this._ReviewerSODate != reviewerSODate) { this._ReviewerSODate = reviewerSODate; } } get ManagementReviewerName(): string { return this._ManagementReviewerName; } set ManagementReviewerName(managementReviewerName: string) { if (this._ManagementReviewerName != managementReviewerName) { this._ManagementReviewerName = managementReviewerName; } } get ManagementReviewerSO(): boolean { return this._ManagementReviewerSO; } set ManagementReviewerSO(managementReviewerSO: boolean) { if (this._ManagementReviewerSO != managementReviewerSO) { this._ManagementReviewerSO = managementReviewerSO; } } get ManagementReviewerSODate(): Date { return this._ManagementReviewerSODate; } set ManagementReviewerSODate(managementReviewerSODate: Date) { if (this._ManagementReviewerSODate != managementReviewerSODate) { this._ManagementReviewerSODate = managementReviewerSODate; } } }Slide Up/Down in a table row with vanilla JavaScript
I'm trying to do an accordion-type transition component in a table VUE component. The problem is that with display: none; can't be calculate the height before applying the transition. JQuery does, but I can't reproduce it with pure javascript. Any CSS / JS guru that can help me?
Core of the transition:
methods: { beforeEnter (el) { const heightNeeded = el.scrollHeight el.classList.remove('collapse') el.style.display = 'table-row' el.classList.add('collapsing') el.style.height = heightNeeded + 'px' }, afterEnter (el) { el.classList.remove('collapsing') el.classList.add('collapse', 'in') }, beforeLeave (el) { el.classList.add('collapsing') el.classList.remove('collapse', 'in') el.style.height = 0 }, afterLeave (el) { el.classList.remove('collapsing') el.classList.add('collapse') el.style.display = 'table-row' } }Is there an issue retriving json data when using vue, axios, and laravel?
I am trying to replicate a tutorial on vuecasts (https://laracasts.com/series/learn-vue-2-step-by-step/episodes/18).
Everything looks fine and I don't get any errors except a warning:
Resource interpreted as Document but transferred with MIME type application/json: "http://vueme.app:8000/skills"
web.php:
Route::get('/', function () { return view('welcome'); }); Route::get('skills', function(){ return ['javascript', 'php', 'python']; });welcome.blade.php:
<!doctype html> <html lang="{{ app()->getLocale() }}"> <head> <meta charset="utf-8"> <title>Laravel</title> </head> <body> <div id="root"> <ul> <li v-for="skill in skills" v-text="skill"></li> </ul> </div> <script scr="https://unpkg.com/axios/dist/axios.min.js"></script> <script scr="https://unpkg.com/vue"></script> <script scr="/js/app.js"></script> </body> </html>app.js:
new Vue({ el: '#root', data:{ skills:[] }, mounted(){ axios.get('/skills').then(response => this.skills = response.data); } });What's not working?
Property or method "LoadData" is not defined on the instance but referenced during render
I am using vibed.org that use Pub-based HTML preprocessor. The generated page is look like:
<!DOCTYPE html> <html> <head> <script src="https://unpkg.com/vue"></script><script src="https://cdn.jsdelivr.net/npm/vue-resource@1.3.4"></script> <link rel="stylesheet" type="text/css" href="site.css"/> <title>Hello, World</title> </head> <body> <div id="app"> {{message}} <div class="MainContainer"> <div class="LeftSide">44</div> <div class="RightSide"> <button @click="LoadData()">LoadData</button> </div> </div> </div> <script src="app.js"></script> </body> </html>app.js:
document.ready= function() { var app = new Vue({ el: '#app', data: { message: 'Hello Vue!' }, methods: { LoadData: function() { console.log('Hello'); } } }); app.$mount('#app'); }My page in browser looks like:
So message is rending correctly. But when I am clicking on button I am getting error: vue@2.4.2:485 [Vue warn]: Property or method "LoadData" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
extend vue component with google.maps.OverlayView()
I'm trying to implement custom google maps markers with vue.js; based on this document to add custom marker on map it's require to define subclass of new google.maps.OverlayView() with prototype inheritance.
How could I inherit my vue.js component from it. when I do something like:
let Marker1 = Vue.component('marker1', { ... }) Marker1.prototype = new google.maps.OverlayView();it's fails with exception:
Uncaught TypeError: this._init is not a function
Set an interval for every 12 hours
I need a function to run initially and then to rerun at 12pm and 12am. I'm using VueJS if that has any influence.
fetch_datetime() { axios.get('/api/core/datetime').then((response) => { this.datetime = response.data; this.set_interval(); }); }, set_interval() { var current_date = new Date(); var hours = current_date.getHours(); var minutes = current_date.getMinutes(); var seconds = current_date.getSeconds(); if(hours == 12 && minutes == 0 && seconds == 0 || hours == 0 && minutes == 0 && seconds == 0) { this.fetch_datetime(); } else { if(hours >= 12) { setTimeout(this.fetch_datetime, (1000 * (60 - seconds) * (60 - minutes)) + (1000 * 60 * (24 - hours - 1) * 60)); } else { setTimeout(this.fetch_datetime, (1000 * (60 - seconds) * (60 - minutes)) + (1000 * 60 * (12 - hours - 1) * 60)); } }However this isn't working as expected and the function runs early and then runs multiple times on the hour.
Why would this v-text-field loose its binding and formatting when placed inside a tab Vuetify tab component
I am using Vuetify and using the tabs component. However, when I put v-text-field inside a one of the tabs. Load the page up first time you click on the text field then it highlights properly and is bound. Click on the link to go to tab 2 then click back to 1 and the input will disappear. Then cycle through again and the input is back but unbound and unformatted. Does anyone have any idea how to to keep it bound?
This is the code pen https://codepen.io/jakemcallister/pen/rzaLRK
Bellow is the code: JS
var demo = new Vue({ el: '#demo', data: { title: 'Demo', current_object: { name: 'Hello' } } })HTML:
<div id="demo" v-cloak> <h1>{{title | uppercase}}</h1> <v-tabs light :scrollable="false" transition="none"> <v-tabs-bar slot="activators" class="grey lighten-3 light"> <v-tabs-slider class="light-blue darken-4"></v-tabs-slider> <v-tabs-item key="details" href="#details"> details </v-tabs-item> <v-tabs-item key="users" href="#users"> users </v-tabs-item> </v-tabs-bar> <v-tabs-content key="details" id='details' transition="none"> <v-card flat> <v-container fluid > tab 1 <v-layout row> <v-flex xs2><v-subheader>Name</v-subheader></v-flex> <v-flex xs4><v-text-field v-model="current_object.name" single-line key='company-name'></v-text-field></v-flex> </v-layout> </v-container> </v-card> </v-tabs-content> <v-tabs-content key="users" id='users' transition="none"> <v-card flat> tab 2 </v-card> </v-tabs-content> </v-tabs> </div>vuejs blank page after npm run build
I faced problem in a vue.js SPA project when upload in a server.
When I run npm run dev it works properly but after I run npm run build and upload to server then the project has blank page. But the favicon and title work fine. When I run npm run build got this message
"Tip: built files are meant to be served over an HTTP server. Opening index.html over file:// won't work."
If I manually refer the project resources in index.html, the page display it's contents but vue-router doesn't work.
I would appreciate if someone can suggest solutions to get rid off this problem.
Why computed data not updated in vuejs?
Vue don't re-render block after data changed
All data in vuex store
On click in element called method checkSys
Why cur_systems not updated and return empty array?
VueRouter route should select first child by default
Hi everyone i'm using Vue-Router 2.5.3 and i have the following Route structure.
path: "/admin", component: require("./views/layouts/MasterLayout.vue"), meta: { requiresAuth: true }, children: [ { path: 'dashboard', component: require("./views/Dashboard.vue"), alias: "/", name: "dashboard" }, { path: 'upload', component: require("./views/Upload.vue"), name: "upload", redirect: {name: 'upload.photo'}, children: [ { path: 'photo', component: require("./components/Uploaders/ImagesUploader.vue"), name: "upload.photo", props: { selected: true, successEndpoint: "/api/v1/upload/complete", uploadEndpoint: "/api/v1/upload" } }, { path: 'video', component: require("./components/Uploaders/VideoUploader.vue"), name: "upload.video", props: { selected: true, successEndpoint: "/api/v1/upload/complete", uploadEndpoint: "/api/v1/upload" } } ] },And i have an issue with this configuration, whenever i navigate to "admin/upload" it shows a blank page, i want it to show "admin/upload/photo" by default even if my users navigate to "admin/upload" how can i acheive this in Vue Router?
I've already tried defining aliases in both "upload" and in the child routes and nothing happened, then i tried to define the redirect key in the "upload" parent route as well and again blank page...
I don't quite get what im going wrong, is it the fact that my structure has two levels of nesting? But if that's a problem how do i define these routes using only one level of nesting?
setTimeout() not working called from vueJS method
I am trying to allow a user to reset or shutdown a given server from an app. Im working on the interface right now, and want to give the user messages as to what is happening. I display a message defined in my data object to indicate the action taken. I thene use setTimeout to switch a resetting.... message with a reset message. See the following method.
systemReset: function(){ this.message = this.server + ': Resetting'; setTimeout(function(){ this.message = this.server + ': Reset'; }, 2000); }In my browser I can trigger this message and my message of "Resetting" displays, but the following "Reset" message is never output. Do I have any formatting errors?
To put this method in context here is my entire component.
<template> <div> <p>{{message}}</p> <button @click="systemReset">Reset Server</button> <button @click="systemPowerDown">Poweroff Server</button> </div> </template> <script type="text/javascript"> export default{ data: function(){ return{ message: '' } }, methods: { systemPowerDown: function(){ this.message = this.server + ': Server Down'; }, systemReset: function(){ this.message = this.server + ': Resetting'; setTimeout(function(){ this.message = this.server + ': Reset'; }, 2000); } }, props: ['server'] } </script> Am I missing something obvious? Or is there some vue limitation I am unaware of?Vue js --The dependency was not found : ts-loader not compiling
The scenario: There is a library with generic vue js components that will be used by several projects and not using typscript. The library is a seperate project and have seperate webpack settings.
This library is being consumed inside my project as a git sub module atm and my project( I will call as main project here) is using typscript and ts-loader to compile the js and ts .
Can any one guide me wether it is problem because one project is using ts and other not? something with the module config? I can access other folder and files outside of main project src directory, but not the components inside of this library? If any one has a better way of doing the, will be thankful for advise!
/** webpack.base.conf (from main project **/ module: { { test: /\.ts$/, loader: 'ts-loader', include: [resolve('src'), resolve('test')], exclude: '/node_modules', options: { appendTsSuffixTo: [/\.vue$/] } } }Inside of my main projects component I am trying to import one the components from the library, which I am unable to as ts-loader tells the dependency was not found
/** Header.vue (main project)**/ <template> </template> <script lang="ts"> // lib in root same as src folder for main project import GenericComponentFromLib from 'lib/generic-components/src/components/GenericButton' @Components({ components: { GenericButton } }) /** tsconfig.json (main project) **/ { "compilerOptions": { "target": "es5", "lib": ["es5", "es2015.promise","es2017.object", "dom"], "module": "commonjs", "rootDir": ".", "moduleResolution": "node", "allowSyntheticDefaultImports": true, "experimentalDecorators": true }, "exclude": [ "node_modules" ] }TypeScript and the this keyword (SharePoint Framework and Vue)
I'm working on a SharePoint Framework web part and using Vue.js.
Given this snippet:
export default class MyWorkspaceTestWebPart extends BaseClientSideWebPart<IMyWorkspaceTestWebPartProps> { public uol_app; public render(): void { this.domElement.innerHTML = "some markup" this.uol_app = new Vue({ el: `#vueapp-${this.context.instanceId}`, data: { announcements: [], numOfAnnouncements: 4 }, computed: { announcementsTrimmed: function() { return this.uol_app.announcements.splice(0, this.uol_app.numOfAnnouncements) } } }) } }On that last return statement, how can I get to the announcements and numOfAnnouncements Vue data properties?
I have tried:
return this.uol_app.announcements.splice(0, this.uol_app.numOfAnnouncements) return this.uol_app.data.announcements.splice(0, this.uol_app.data.numOfAnnouncements) return this.data.announcements.splice(0, this.data.numOfAnnouncements) return this.announcements.splice(0, this.numOfAnnouncements) return uol_app.announcements.splice(0, this.numOfAnnouncements)How to publish a library of Vue.js components?
I am working on a project containing a Vuex module and an abstract components that users can extend from.
I would love to publish this on NPM to clean up my codebase and pull this away from my project as a solid well tested module. I have specified the main file in package.json to load an index which imports everything I want to expose:
https://github.com/stephan-v/vue-search-filters/
The index contains this at the moment:
import AbstractFilter from './src/components/filters/abstract/AbstractFilter.vue'; import Search from './src/store/modules/search'; module.exports = { AbstractFilter, Search };For this to work I need to transpile this since a babel compiler normally won't transpile files imported from node_modules(Correct me if I am wrong here). Besides that I would probably be a good idea to do this so it can be used by different systems.
How do I transpile only the files that I need though with Webpack? Do I have to create a separate config for this?
What does a config like that look like? I know the vue-cli has a build command for one single file component but this is a bit different.
Any tips or suggestions on how to transpile something like this are welcome.