File tree Expand file tree Collapse file tree 3 files changed +33
-7
lines changed
Expand file tree Collapse file tree 3 files changed +33
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ module.exports = function (/* ctx */) {
1313 // --> boot files are part of "main.js"
1414 // https://quasar.dev/quasar-cli/cli-documentation/boot-files
1515 boot : [
16-
16+ 'cerebral'
1717 ] ,
1818
1919 // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
@@ -64,7 +64,8 @@ module.exports = function (/* ctx */) {
6464
6565 // Full list of options: https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
6666 build : {
67- vueRouterMode : 'hash' , // available values: 'hash', 'history'
67+ vueRouterMode : 'history' , // available values: 'hash', 'history'
68+ vueCompiler : true , // <- important to integrate Cerebral
6869
6970 // rtl: false, // https://quasar.dev/options/rtl-support
7071 // showProgress: false,
@@ -93,7 +94,7 @@ cfg.module.rules.push({
9394 devServer : {
9495 https : false ,
9596 port : 8080 ,
96- open : true // opens browser window automatically
97+ open : false // opens browser window automatically
9798 } ,
9899
99100 // animations: 'all', // --- includes all animations
Original file line number Diff line number Diff line change 1+ import { Container } from "@cerebral/vue" ;
2+ import Cerebral from "cerebral" ;
3+ import App from '../App.vue'
4+
5+ const Controller = Cerebral ( {
6+ state : {
7+ message : 'Welcome to Cerebral!' ,
8+ } ,
9+ } ) ;
10+
11+ export default async ( context ) => {
12+ let render = h =>
13+ h ( {
14+ components : {
15+ HOC : Container ( Controller ) ,
16+ App,
17+ } ,
18+ template : '<HOC><App/></HOC>' ,
19+ } )
20+ context . app . render = render
21+ }
Original file line number Diff line number Diff line change 33 <img
44 alt =" Quasar logo"
55 src =" ~assets/quasar-logo-full.svg"
6- >
6+ />
7+ <h1 class =" bg-yellow-4" >{{welcome}}</h1 >
78 </q-page >
89</template >
910
1011<script >
11- export default {
12- name: ' PageIndex'
13- }
12+ import {connect } from ' @cerebral/vue'
13+ import {state } from ' cerebral'
14+
15+ export default connect ({welcome: state` message` }, {
16+ name: ' PageIndex' ,
17+ })
1418 </script >
You can’t perform that action at this time.
0 commit comments