0π
From bootstrap.js delete import VueRouter from 'vue-router';
and Vue.use(VueRouter);
and add Router plugin to Vue inside of routes.js file and edit it as below:
import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);
export default new VueRouter({
routes: [
{
path: '/',
component: require('./views/Home.vue')
}
]
});
app.js is correct. I have implemented and tested this everything worked as expected.
- [Vuejs]-How to return geolocation response object to be used in different components?
- [Vuejs]-How to bind a class that came from another component as a prop
0π
This is what I did to fix my own issue.
Add .default
to require('./components/ExampleComponent.vue')
Like so require('./components/ExampleComponent.vue').default
- [Vuejs]-How to do an image as a component template, with src as a property in Vue
- [Vuejs]-How can I refresh computed property
0π
Replace all webpack resolve aliases with relative paths
I stubmled across an issue where the the webpack [chunkhash] placeholder in the output.chunkFilename webpack option causes an issue
Modifying webpack optimization.splitChunks.chunks option
const mix = require('laravel-mix');
const fs = require('fs');
const webpack = require('webpack');
const tailwind = require('tailwindcss');
const path = require('path');
const glob = require('glob');
const exec = require('child_process').exec;
const pwa = require('sw-precache-webpack-plugin');
mix.webpackConfig({
output: {
chunkFilename: 'js/[name].js',
},
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
],
});
mix.version();
// ...
mix.js('resources/js/app/app.js', 'public/js/app.js');
Source:stackexchange.com