uivisor 0.1.3 → 0.1.4

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.
@@ -96,12 +96,13 @@ function withUivisor(nextConfig = {}, options = {}) {
96
96
  }
97
97
  if (useTurbopack) {
98
98
  const ld = [{ loader: "uivisor/next/loader", options: { attr } }];
99
+ const major = nextMajor();
100
+ const modern = major === 0 || major >= 15;
99
101
  const rules = {
100
- "*.tsx": { loaders: ld, as: "*.tsx" },
101
- "*.jsx": { loaders: ld, as: "*.jsx" }
102
+ "*.tsx": modern ? { loaders: ld } : { loaders: ld, as: "*.tsx" },
103
+ "*.jsx": modern ? { loaders: ld } : { loaders: ld, as: "*.jsx" }
102
104
  };
103
- const major = nextMajor();
104
- if (major === 0 || major >= 15) {
105
+ if (modern) {
105
106
  out.turbopack = {
106
107
  ...nextConfig.turbopack,
107
108
  rules: { ...nextConfig.turbopack?.rules ?? {}, ...rules }
@@ -68,12 +68,13 @@ function withUivisor(nextConfig = {}, options = {}) {
68
68
  }
69
69
  if (useTurbopack) {
70
70
  const ld = [{ loader: "uivisor/next/loader", options: { attr } }];
71
+ const major = nextMajor();
72
+ const modern = major === 0 || major >= 15;
71
73
  const rules = {
72
- "*.tsx": { loaders: ld, as: "*.tsx" },
73
- "*.jsx": { loaders: ld, as: "*.jsx" }
74
+ "*.tsx": modern ? { loaders: ld } : { loaders: ld, as: "*.tsx" },
75
+ "*.jsx": modern ? { loaders: ld } : { loaders: ld, as: "*.jsx" }
74
76
  };
75
- const major = nextMajor();
76
- if (major === 0 || major >= 15) {
77
+ if (modern) {
77
78
  out.turbopack = {
78
79
  ...nextConfig.turbopack,
79
80
  rules: { ...nextConfig.turbopack?.rules ?? {}, ...rules }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uivisor",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Dev-only visual UI tweaker that turns mouse edits into a precise, breakpoint-aware prompt for your AI coding agent — without touching your source.",
6
6
  "license": "MIT",