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.
1313- Avoid adding mobile/desktop specific modules, plugins and css
1414 - Instead use [ desktop/nuxt.config] ( ./packages/desktop/nuxt.config.js ) and [ mobile/nuxt.config] ( ./packages/mobile/nuxt.config.js )
1515
16- ## Pages
16+ ## Pages / Layouts
1717
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 .
1919
20- ## Store
20+ We use named components to implement them per-variant.
2121
22- Only top-level ` store/ ` directory is supported. It is best to write shared logic inside vuex store modules.
22+ ## Store
2323
24- ## Layout
24+ Only [ base/store ] ( ./packages/base/store ) directory is supported.
2525
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 .
2727
2828## Styles
2929
3030It is recommended to use scoped styles. But in case that need to use global styles,
3131they 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'
22
33export default nuxtConfig ( {
44 name : '@app/base' ,
5- rootDir : __dirname
5+ srcDir : __dirname
66} )
Original file line number Diff line number Diff line change 22 <main >
33 <Nuxt />
44 <footer >
5- <a href =" /m/ " >Mobile Version</a >
5+ <a href =" # " >Mobile Version</a >
66 </footer >
77 </main >
88</template >
Original file line number Diff line number Diff line change 22 <main >
33 <Nuxt />
44 <footer >
5- <a href =" / " >Desktop Version</a >
5+ <a href =" # " >Desktop Version</a >
66 </footer >
77 </main >
88</template >
Original file line number Diff line number Diff line change @@ -2,8 +2,5 @@ import { nuxtConfig } from 'nuxt-extend'
22
33export default nuxtConfig ( {
44 name : '@app/mobile' ,
5- extends : '@app/base/nuxt.config' ,
6- router : {
7- base : '/m'
8- }
5+ extends : '@app/base/nuxt.config'
96} )
You can’t perform that action at this time.
0 commit comments