Comments (11)
@rstoenescu,
My routes.js (and every other file) is exactly as in the template (unchanged)
https://github.com/quasarframework/quasar-starter-kit/blob/master/template/src/router/routes.js
Totally fresh install with no changes.
@skmbr,
if you really need to get it building you could go back to non-lazy routes for the meantime.
ie
import Default from '../layouts/default'
import Index from '../pages/index'
import PageNotFound from '../pages/404'
export default [
{
path: '/',
// component: () => import('layouts/default'),
component: Default,
children: [
// { path: '',component: () => import('pages/index') }
{ path: '', component: Index }
]
},
{
// Always leave this as last one
path: '*',
component: PageNotFound
// component: () => import('pages/404')
}
]
from quasar-starter-kit.
If anyone experiences this issue
TypeError: undefined is not an object (evaluating 'e[0].match')
Well, solutions is the same (babel-plugin-dynamic-import-node):
npm install babel-plugin-dynamic-import-node --save-dev
and add this into .babelrc
file
{
"plugins": ["dynamic-import-node"]
}
from quasar-starter-kit.
Hi,
Root cause: Webpack 4 (possibly Webpack 3 too) does not allow to lazy load a parent layout/page then not lazy loading any children. What I mean is:
import Two from './two.vue'
//...then routes:
{
path: '/something',
// lazy load a layout/page with children
component: () => import('./something.vue'),
children: [
// lazy load -> GOOD
{path: 'one', component: () => import('./one.vue')},
// not lazy load -> BAD! we got the parent lazy loading,
// so we are forced to lazy load this too
{path: 'two', component: Two}
]
}
from quasar-starter-kit.
Not sure I understand..... My routes.js looks like this:
export default [
{
path: '/',
component: () => import('components/Main'),
children: [
{
path: '',
meta: {
title: 'Tenpin Toolkit',
toolName: 'splash'
},
component: () => import('components/Splash')
},
{
path: 'axis',
meta: {
title: 'Axis Tilt & Rotation',
toolName: 'axis'
},
component: () => import('components/Axis')
},
{
path: 'speed',
meta: {
title: 'Ball Speed & RPM',
toolName: 'speed'
},
component: () => import('components/Speed')
},
[ OTHER ROUTES REMOVED - all defined the same way ]
]
},
{ // Always leave this as last one
path: '*',
component: () => import('pages/404')
}
]
If I'm reading your post right, mine are all done in the "GOOD" way?
The bizarre thing for me with this issue is that setting everything up on another computer works fine, but I'm going to have to give that back soon at which point I'm going to be stuck not able to build my apps any more. :(
from quasar-starter-kit.
Gonna reopen this, but it's a Webpack issue... the error comes from Webpack. Currently don't have time to fully investigate as I'm preparing the SSR release :((
from quasar-starter-kit.
@km333 Thanks for the tip! May have to do that.
What are the performance implications of using non-lazy routes?
from quasar-starter-kit.
Every route's code is loaded at startup.
from quasar-starter-kit.
Confirm this workaround works for me given the same symptom in 0.16.0
from quasar-starter-kit.
I don't know exactly what causes this problem, but the routes.js
file in the development server makes the imports like this:
{
path: '/',
component: function component() {
return __webpack_require__.e(/*! import() */ 0).then(__webpack_require__.bind(null, /*! layouts/default */ "./src/layouts/default.vue"));
},
And after quasar build
, the final code is like this:
[{
path: "/",
component: function() {
return n.e(0).then(n.bind(null, "ez0Y"))
},
The issue #4842 on Webpack's repository apparently is about this, and was solved by using Airbnb's Babel plugin for dynamic import.
After addding ["dynamic-import-node"]
to the .babelrc
file, the final code works, and looks like this:
[{
path: "/",
component: function() {
return Promise.resolve().then(function() {
return Ce()(n("ez0Y"))
})
},
from quasar-starter-kit.
Is this still a problem? Seems babel-plugin-dynamic-import-node
and babel-plugin-module-resolver
deps are still needed into @quasar/babel-preset-app
package.json, but never used
from quasar-starter-kit.
Closing as stale
from quasar-starter-kit.
Related Issues (20)
- Composition API not instantiated fast enough to be used outside of components HOT 11
- Outdated dependency warnings HOT 1
- Starter Kits Capacitor iOS builds in simulator but times out on device HOT 2
- Including module-example in store prevents SSR from rendering HOT 1
- Quasar Create Issue in Windows HOT 2
- EssentialLink does not use openURL HOT 1
- Relative module not found on i18n - branch next HOT 1
- Feature: command line option to re-apply templates HOT 1
- i18n: auto-detect locale HOT 2
- SSR mode use axios cross-request state pollution HOT 5
- Setup fails with lint error with airbnb config HOT 3
- `quasar dev` fails on a new, clean project HOT 1
- ESLint Standard - PropType not found in ‘vue‘ (and other types) HOT 2
- Vue Class Component - Project Inactivity and HMR Failure HOT 4
- readme has incorrect quasar create HOT 3
- SSR + vue-i18n starter kit issue (memory leak) HOT 8
- ESLint 8 support HOT 1
- Failed to Download Starter Kit when Creating Quasar Project HOT 2
- Support TS properly for other ESLint presets and/or make Prettier the recommended TS preset HOT 1
- Browserlist is too inclusive HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quasar-starter-kit.