@vtj/local 0.9.8 → 0.9.9

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/dist/plugin.mjs +19 -4
  2. package/package.json +4 -4
package/dist/plugin.mjs CHANGED
@@ -134,10 +134,25 @@ const aliasPlugin = function(options) {
134
134
  "@vtj/coder": join(packagesDir, "coder/src")
135
135
  } : {};
136
136
  if (config.resolve) {
137
- config.resolve.alias = Object.assign(config.resolve.alias || {}, {
138
- $vtj: vtjDir,
139
- ...devAlias
140
- });
137
+ let alias = config.resolve.alias || {};
138
+ if (Array.isArray(alias)) {
139
+ alias.push({
140
+ find: "$vtj",
141
+ replacement: vtjDir
142
+ });
143
+ alias.push(
144
+ ...Object.entries(devAlias).map(([find, replacement]) => ({
145
+ find,
146
+ replacement
147
+ }))
148
+ );
149
+ } else {
150
+ Object.assign(alias, {
151
+ $vtj: vtjDir,
152
+ ...devAlias
153
+ });
154
+ }
155
+ config.resolve.alias = alias;
141
156
  } else {
142
157
  config.resolve = {
143
158
  alias: {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@vtj/local",
3
3
  "private": false,
4
- "version": "0.9.8",
4
+ "version": "0.9.9",
5
5
  "type": "module",
6
6
  "dependencies": {
7
7
  "formidable": "~3.5.1",
8
- "@vtj/coder": "~0.9.8",
9
- "@vtj/core": "~0.9.8",
10
- "@vtj/node": "~0.9.6"
8
+ "@vtj/node": "~0.9.6",
9
+ "@vtj/core": "~0.9.9",
10
+ "@vtj/coder": "~0.9.9"
11
11
  },
12
12
  "devDependencies": {
13
13
  "@types/formidable": "~3.4.5",