@md-plugins/quasar-app-extension-vite-md-plugin 0.1.0-alpha.4 → 0.1.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/index.js +8 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@md-plugins/quasar-app-extension-vite-md-plugin",
3
- "version": "0.1.0-alpha.4",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "A Quasar app-ext for @md-plugins/viteMdPlugin",
5
5
  "author": "Jeff <galbraith64@gmail.com>",
6
6
  "license": "MIT",
@@ -23,7 +23,7 @@
23
23
  "viteMdPlugin"
24
24
  ],
25
25
  "dependencies": {
26
- "@md-plugins/vite-md-plugin": "^0.1.0-alpha.2"
26
+ "@md-plugins/vite-md-plugin": "0.1.0-alpha.5"
27
27
  },
28
28
  "scripts": {
29
29
  "test": "echo \"No test specified\" && exit 0"
package/src/index.js CHANGED
@@ -6,26 +6,27 @@
6
6
  * Docs: https://quasar.dev/app-extensions/development-guide/index-api
7
7
  */
8
8
 
9
- function extendConfig(config, api) {
9
+ function extendConfig(config) {
10
10
  // make sure 'vueRouterMode' has 'history' mode
11
- if (api.ctx.build.vueRouterMode !== 'history') {
11
+ if (config.build.vueRouterMode !== 'history') {
12
12
  console.log('Changing vueRouterMode to "history"')
13
- api.ctx.build.vueRouterMode = 'history'
13
+ config.build.vueRouterMode = 'history'
14
14
  }
15
15
 
16
- api.ctx.build.viteVuePluginOptions.include = api.ctx.build.viteVuePluginOptions.include || []
17
- api.ctx.build.viteVuePluginOptions.include.push(/\.(vue|md)$/)
16
+ config.build.viteVuePluginOptions.include = config.build.viteVuePluginOptions.include || []
17
+ config.build.viteVuePluginOptions.include.push(/\.(vue|md)$/)
18
18
 
19
- const extensions = new Set(api.ctx.framework.autoImportVueExtensions || [])
19
+ const extensions = new Set(config.framework.autoImportVueExtensions || [])
20
20
  extensions.add('md')
21
21
  extensions.add('vue')
22
- api.ctx.framework.autoImportVueExtensions = Array.from(extensions)
22
+ config.framework.autoImportVueExtensions = Array.from(extensions)
23
23
  }
24
24
 
25
25
  export default function (api) {
26
26
  // verify this is a Vite project
27
27
  if (!api.hasVite) {
28
28
  console.error('This extension requires Vite')
29
+ throw new Error('This extension requires Vite')
29
30
  }
30
31
 
31
32
  api.compatibleWith('quasar', '^2.0.0')