@marko/vite 4.1.1 → 4.1.2

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/index.mjs +10 -7
  2. package/package.json +26 -26
package/dist/index.mjs CHANGED
@@ -777,12 +777,15 @@ function markoPlugin(opts = {}) {
777
777
  });
778
778
  if (isTest) {
779
779
  linked = false;
780
- if (config.test?.environment?.includes(
781
- "dom"
782
- )) {
780
+ const { test } = config;
781
+ if (test.environment?.includes("dom")) {
783
782
  config.resolve ??= {};
784
783
  config.resolve.conditions ??= [];
785
784
  config.resolve.conditions.push("browser");
785
+ test.deps ??= {};
786
+ test.optimizer ??= {};
787
+ test.optimizer.web ??= {};
788
+ test.optimizer.web.enabled ??= true;
786
789
  }
787
790
  }
788
791
  if (!registeredTagLib) {
@@ -808,17 +811,17 @@ function markoPlugin(opts = {}) {
808
811
  const esbuildPlugins = esbuildOptions.plugins ??= [];
809
812
  esbuildPlugins.push(esbuildPlugin(compiler, baseConfig));
810
813
  const ssr = config.ssr ??= {};
811
- let { noExternal } = ssr;
814
+ const { noExternal } = ssr;
812
815
  if (noExternal !== true) {
813
816
  const noExternalReg = /\.marko$/;
814
817
  if (noExternal) {
815
818
  if (Array.isArray(noExternal)) {
816
- noExternal.push(noExternalReg);
819
+ ssr.noExternal = [...noExternal, noExternalReg];
817
820
  } else {
818
- noExternal = [noExternal, noExternalReg];
821
+ ssr.noExternal = [noExternal, noExternalReg];
819
822
  }
820
823
  } else {
821
- noExternal = noExternalReg;
824
+ ssr.noExternal = noExternalReg;
822
825
  }
823
826
  }
824
827
  if (basePathVar) {
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
2
  "name": "@marko/vite",
3
3
  "description": "A Marko plugin for Vite",
4
- "version": "4.1.1",
4
+ "version": "4.1.2",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/vite/issues",
7
7
  "dependencies": {
8
8
  "anymatch": "^3.1.3",
9
9
  "domelementtype": "^2.3.0",
10
10
  "domhandler": "^5.0.3",
11
- "htmlparser2": "^9.0.0",
11
+ "htmlparser2": "^9.1.0",
12
12
  "resolve": "^1.22.8",
13
13
  "resolve.exports": "^2.0.2"
14
14
  },
15
15
  "devDependencies": {
16
- "@changesets/changelog-github": "^0.4.8",
17
- "@changesets/cli": "^2.26.2",
18
- "@marko/compiler": "^5.33.8",
16
+ "@changesets/changelog-github": "^0.5.0",
17
+ "@changesets/cli": "^2.27.1",
18
+ "@marko/compiler": "^5.34.7",
19
19
  "@marko/fixture-snapshots": "^2.2.1",
20
- "@marko/testing-library": "^6.1.4",
21
- "@types/babel__core": "^7.20.4",
22
- "@types/jsdom": "^21.1.5",
23
- "@types/mocha": "^10.0.4",
24
- "@types/node": "^20.9.1",
25
- "@types/resolve": "^1.20.5",
20
+ "@marko/testing-library": "^6.2.0",
21
+ "@types/babel__core": "^7.20.5",
22
+ "@types/jsdom": "^21.1.6",
23
+ "@types/mocha": "^10.0.6",
24
+ "@types/node": "^20.11.20",
25
+ "@types/resolve": "^1.20.6",
26
26
  "@types/serve-handler": "^6.1.4",
27
- "@typescript-eslint/eslint-plugin": "^6.11.0",
28
- "@typescript-eslint/parser": "^6.11.0",
27
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
28
+ "@typescript-eslint/parser": "^7.1.0",
29
29
  "cross-env": "^7.0.3",
30
- "esbuild": "^0.19.5",
31
- "eslint": "^8.53.0",
32
- "eslint-config-prettier": "^9.0.0",
30
+ "esbuild": "^0.20.1",
31
+ "eslint": "^8.57.0",
32
+ "eslint-config-prettier": "^9.1.0",
33
33
  "fixpack": "^4.0.0",
34
- "husky": "^8.0.3",
35
- "jsdom": "^22.1.0",
36
- "lint-staged": "^15.1.0",
37
- "marko": "^5.31.18",
38
- "mocha": "^10.2.0",
34
+ "husky": "^9.0.11",
35
+ "jsdom": "^24.0.0",
36
+ "lint-staged": "^15.2.2",
37
+ "marko": "^5.32.13",
38
+ "mocha": "^10.3.0",
39
39
  "mocha-snap": "^5.0.0",
40
40
  "nyc": "^15.1.0",
41
- "playwright": "^1.40.0",
42
- "prettier": "^3.1.0",
41
+ "playwright": "^1.41.2",
42
+ "prettier": "^3.2.5",
43
43
  "serve-handler": "^6.1.5",
44
- "tsx": "^4.1.2",
45
- "typescript": "^5.2.2",
46
- "vite": "^5.0.0"
44
+ "tsx": "^4.7.1",
45
+ "typescript": "^5.3.3",
46
+ "vite": "^5.1.4"
47
47
  },
48
48
  "files": [
49
49
  "dist",