@vcmap/plugin-cli 2.1.16 → 2.1.17
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.
- package/package.json +1 -1
- package/src/serve.js +5 -1
package/package.json
CHANGED
package/src/serve.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
+
import { readFile } from 'fs/promises';
|
|
2
3
|
import { createServer } from 'vite';
|
|
3
4
|
import vue2 from '@vitejs/plugin-vue2';
|
|
4
5
|
import express from 'express';
|
|
@@ -119,7 +120,10 @@ export default async function serve(options) {
|
|
|
119
120
|
|
|
120
121
|
// We exclude ui dependencies from optimization, to allow plugins to use another version of the same plugin.
|
|
121
122
|
// vitejs seems to have a problem with optimized deps in different versions.
|
|
122
|
-
const
|
|
123
|
+
const uiPackageJsonPath = path.join(resolveMapUi(), 'package.json');
|
|
124
|
+
const { dependencies } = JSON.parse(
|
|
125
|
+
(await readFile(uiPackageJsonPath)).toString(),
|
|
126
|
+
);
|
|
123
127
|
|
|
124
128
|
const excludedOptimizations = Object.keys(dependencies).filter(
|
|
125
129
|
(name) => !optimizationIncludes.includes(name),
|