File tree Expand file tree Collapse file tree 5 files changed +12
-13
lines changed Expand file tree Collapse file tree 5 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -13,19 +13,21 @@ to create a multi-variant mobile/desktop nuxt application.
13
13
- Avoid adding mobile/desktop specific modules, plugins and css
14
14
- Instead use [ desktop/nuxt.config] ( ./packages/desktop/nuxt.config.js ) and [ mobile/nuxt.config] ( ./packages/mobile/nuxt.config.js )
15
15
16
- ## Pages
16
+ ## Pages / Layouts
17
17
18
- Only top-level ` pages/ ` directory is supported. It is best to always use a named component and implement per-variant .
18
+ Only [ base/ pages] ( ./packages/base/pages ) and [ base/layouts ] ( ./packages/base/layouts ) directories are supported .
19
19
20
- ## Store
20
+ We use named components to implement them per-variant.
21
21
22
- Only top-level ` store/ ` directory is supported. It is best to write shared logic inside vuex store modules.
22
+ ## Store
23
23
24
- ## Layout
24
+ Only [ base/store ] ( ./packages/base/store ) directory is supported.
25
25
26
- Using named components, it can be implemented with ` components/AppLayout.vue ` per-variant .
26
+ It is best to write shared logic inside vuex store modules .
27
27
28
28
## Styles
29
29
30
30
It is recommended to use scoped styles. But in case that need to use global styles,
31
31
they can be included in layout component or ` nuxt.config ` of each variant.
32
+
33
+ Also for component libraries, you can include their module in each variant.
Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ import { nuxtConfig } from 'nuxt-extend'
2
2
3
3
export default nuxtConfig ( {
4
4
name : '@app/base' ,
5
- rootDir : __dirname
5
+ srcDir : __dirname
6
6
} )
Original file line number Diff line number Diff line change 2
2
<main >
3
3
<Nuxt />
4
4
<footer >
5
- <a href =" /m/ " >Mobile Version</a >
5
+ <a href =" # " >Mobile Version</a >
6
6
</footer >
7
7
</main >
8
8
</template >
Original file line number Diff line number Diff line change 2
2
<main >
3
3
<Nuxt />
4
4
<footer >
5
- <a href =" / " >Desktop Version</a >
5
+ <a href =" # " >Desktop Version</a >
6
6
</footer >
7
7
</main >
8
8
</template >
Original file line number Diff line number Diff line change @@ -2,8 +2,5 @@ import { nuxtConfig } from 'nuxt-extend'
2
2
3
3
export default nuxtConfig ( {
4
4
name : '@app/mobile' ,
5
- extends : '@app/base/nuxt.config' ,
6
- router : {
7
- base : '/m'
8
- }
5
+ extends : '@app/base/nuxt.config'
9
6
} )
You can’t perform that action at this time.
0 commit comments