@unhead/addons 0.7.0 → 1.0.0

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.
@@ -18,12 +18,14 @@ const TreeshakeServerComposables = unplugin.createUnplugin((userConfig = {}) =>
18
18
  "node_modules"
19
19
  ]);
20
20
  let root = userConfig.root;
21
- let enabled = true;
21
+ let enabled = false;
22
22
  return {
23
23
  name: "unhead:remove-server-composables",
24
24
  enforce: "post",
25
25
  transformInclude(id) {
26
- if (enabled && root && !id.startsWith(root))
26
+ if (!enabled)
27
+ return false;
28
+ if (root && !id.startsWith(root))
27
29
  return false;
28
30
  if (!filter(id))
29
31
  return false;
@@ -48,7 +50,7 @@ const TreeshakeServerComposables = unplugin.createUnplugin((userConfig = {}) =>
48
50
  },
49
51
  webpack(ctx) {
50
52
  if (ctx.name !== "server")
51
- enabled = false;
53
+ enabled = true;
52
54
  },
53
55
  vite: {
54
56
  async config(config) {
@@ -56,10 +58,10 @@ const TreeshakeServerComposables = unplugin.createUnplugin((userConfig = {}) =>
56
58
  },
57
59
  apply(config, env) {
58
60
  if (!env.ssrBuild) {
59
- enabled = false;
60
- return false;
61
+ enabled = true;
62
+ return true;
61
63
  }
62
- return true;
64
+ return false;
63
65
  }
64
66
  }
65
67
  };
@@ -16,12 +16,14 @@ const TreeshakeServerComposables = createUnplugin((userConfig = {}) => {
16
16
  "node_modules"
17
17
  ]);
18
18
  let root = userConfig.root;
19
- let enabled = true;
19
+ let enabled = false;
20
20
  return {
21
21
  name: "unhead:remove-server-composables",
22
22
  enforce: "post",
23
23
  transformInclude(id) {
24
- if (enabled && root && !id.startsWith(root))
24
+ if (!enabled)
25
+ return false;
26
+ if (root && !id.startsWith(root))
25
27
  return false;
26
28
  if (!filter(id))
27
29
  return false;
@@ -46,7 +48,7 @@ const TreeshakeServerComposables = createUnplugin((userConfig = {}) => {
46
48
  },
47
49
  webpack(ctx) {
48
50
  if (ctx.name !== "server")
49
- enabled = false;
51
+ enabled = true;
50
52
  },
51
53
  vite: {
52
54
  async config(config) {
@@ -54,10 +56,10 @@ const TreeshakeServerComposables = createUnplugin((userConfig = {}) => {
54
56
  },
55
57
  apply(config, env) {
56
58
  if (!env.ssrBuild) {
57
- enabled = false;
58
- return false;
59
+ enabled = true;
60
+ return true;
59
61
  }
60
- return true;
62
+ return false;
61
63
  }
62
64
  }
63
65
  };
package/dist/vite.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const TreeshakeServerComposables = require('./shared/addons.ad72c527.cjs');
3
+ const TreeshakeServerComposables = require('./shared/addons.24a86171.cjs');
4
4
  require('unplugin');
5
5
  require('@rollup/pluginutils');
6
6
  require('unplugin-ast');
package/dist/vite.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TreeshakeServerComposables } from './shared/addons.dfbb9146.mjs';
1
+ import { T as TreeshakeServerComposables } from './shared/addons.2b909dbf.mjs';
2
2
  import 'unplugin';
3
3
  import '@rollup/pluginutils';
4
4
  import 'unplugin-ast';
package/dist/webpack.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const TreeshakeServerComposables = require('./shared/addons.ad72c527.cjs');
3
+ const TreeshakeServerComposables = require('./shared/addons.24a86171.cjs');
4
4
  require('unplugin');
5
5
  require('@rollup/pluginutils');
6
6
  require('unplugin-ast');
package/dist/webpack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { T as TreeshakeServerComposables } from './shared/addons.dfbb9146.mjs';
1
+ import { T as TreeshakeServerComposables } from './shared/addons.2b909dbf.mjs';
2
2
  import 'unplugin';
3
3
  import '@rollup/pluginutils';
4
4
  import 'unplugin-ast';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unhead/addons",
3
3
  "type": "module",
4
- "version": "0.7.0",
4
+ "version": "1.0.0",
5
5
  "packageManager": "pnpm@7.14.0",
6
6
  "author": "Harlan Wilton <harlan@harlanzw.com>",
7
7
  "license": "MIT",
@@ -51,8 +51,8 @@
51
51
  ],
52
52
  "dependencies": {
53
53
  "@rollup/pluginutils": "^5.0.2",
54
- "@unhead/schema": "0.7.0",
55
- "unhead": "0.7.0",
54
+ "@unhead/schema": "1.0.0",
55
+ "unhead": "1.0.0",
56
56
  "unplugin": "^1.0.0",
57
57
  "unplugin-ast": "^0.5.5"
58
58
  },