Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/vite-8-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/vite-config': minor
---

Bump to Vite 8 with Rolldown. Drops Vite 6/7 support. Switches to `rolldownOptions` and native `resolve.tsconfigPaths`.
24 changes: 12 additions & 12 deletions integrations/react/snap/cjs/index.cjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const queryCore = require("@tanstack/query-core");
const useClient = require("./use-client.cjs");
const nested = require("./nested/nested.cjs");
exports.Component = useClient.Component;
exports.test = nested.test;
Object.keys(queryCore).forEach((k) => {
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
enumerable: true,
get: () => queryCore[k]
});
const require_use_client = require("./use-client.cjs");
const require_nested = require("./nested/nested.cjs");
exports.Component = require_use_client.Component;
exports.test = require_nested.test;
var _tanstack_query_core = require("@tanstack/query-core");
Object.keys(_tanstack_query_core).forEach(function(k) {
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
enumerable: true,
get: function() {
return _tanstack_query_core[k];
}
});
});
//# sourceMappingURL=index.cjs.map
1 change: 0 additions & 1 deletion integrations/react/snap/cjs/index.cjs.map

This file was deleted.

9 changes: 5 additions & 4 deletions integrations/react/snap/cjs/nested/nested.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const test = "Hello world!";
//#region src/nested/nested.ts
var test = "Hello world!";
//#endregion
exports.test = test;
//# sourceMappingURL=nested.cjs.map

//# sourceMappingURL=nested.cjs.map
2 changes: 1 addition & 1 deletion integrations/react/snap/cjs/nested/nested.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions integrations/react/snap/cjs/use-client.cjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"use client";
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const Component = () => {
return /* @__PURE__ */ jsxRuntime.jsx("div", { children: "Hello world!" });
"use client";
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/use-client.tsx
var Component = () => {
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: "Hello world!" });
};
//#endregion
exports.Component = Component;
//# sourceMappingURL=use-client.cjs.map

//# sourceMappingURL=use-client.cjs.map
2 changes: 1 addition & 1 deletion integrations/react/snap/cjs/use-client.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions integrations/react/snap/esm/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
export * from "@tanstack/query-core";
import { Component } from "./use-client.js";
import { test } from "./nested/nested.js";
export {
Component,
test
};
//# sourceMappingURL=index.js.map
export * from "@tanstack/query-core";
export { Component, test };
1 change: 0 additions & 1 deletion integrations/react/snap/esm/index.js.map

This file was deleted.

11 changes: 6 additions & 5 deletions integrations/react/snap/esm/nested/nested.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integrations/react/snap/esm/nested/nested.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions integrations/react/snap/esm/use-client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integrations/react/snap/esm/use-client.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions integrations/react/tests/build.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFileSync, readdirSync } from 'node:fs'
import { existsSync, readFileSync, readdirSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
Expand All @@ -22,19 +22,23 @@ describe('check React build output', () => {
it('should build the same ESM output', () => {
files.forEach((file) => {
esmExtensions.forEach((ext) => {
expect(
readFileSync(`${rootDir}/dist/esm/${file}${ext}`).toString(),
).toMatchFileSnapshot(`${rootDir}/snap/esm/${file}${ext}`)
const filePath = `${rootDir}/dist/esm/${file}${ext}`
if (!existsSync(filePath)) return
expect(readFileSync(filePath).toString()).toMatchFileSnapshot(
`${rootDir}/snap/esm/${file}${ext}`,
)
})
})
})

it('should build the same CJS output', () => {
files.forEach((file) => {
cjsExtensions.forEach((ext) => {
expect(
readFileSync(`${rootDir}/dist/cjs/${file}${ext}`).toString(),
).toMatchFileSnapshot(`${rootDir}/snap/cjs/${file}${ext}`)
const filePath = `${rootDir}/dist/cjs/${file}${ext}`
if (!existsSync(filePath)) return
expect(readFileSync(filePath).toString()).toMatchFileSnapshot(
`${rootDir}/snap/cjs/${file}${ext}`,
)
})
})
})
Expand Down
9 changes: 5 additions & 4 deletions integrations/vanilla/snap/cjs/dynamic.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const foo = "HELLO";
//#region src/dynamic.ts
var foo = "HELLO";
//#endregion
exports.foo = foo;
//# sourceMappingURL=dynamic.cjs.map

//# sourceMappingURL=dynamic.cjs.map
2 changes: 1 addition & 1 deletion integrations/vanilla/snap/cjs/dynamic.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions integrations/vanilla/snap/cjs/index.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const utils = require("./utils.cjs");
exports.optionalChaining = utils.optionalChaining;
//# sourceMappingURL=index.cjs.map
const require_utils = require("./utils.cjs");
exports.optionalChaining = require_utils.optionalChaining;
1 change: 0 additions & 1 deletion integrations/vanilla/snap/cjs/index.cjs.map

This file was deleted.

11 changes: 6 additions & 5 deletions integrations/vanilla/snap/cjs/utils.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const optionalChaining = (data) => {
return data?.maybe?.property;
//#region src/utils.ts
var optionalChaining = (data) => {
return data?.maybe?.property;
};
console.log(Promise.resolve().then(() => require("./dynamic.cjs")));
//#endregion
exports.optionalChaining = optionalChaining;
//# sourceMappingURL=utils.cjs.map

//# sourceMappingURL=utils.cjs.map
2 changes: 1 addition & 1 deletion integrations/vanilla/snap/cjs/utils.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions integrations/vanilla/snap/esm/dynamic.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integrations/vanilla/snap/esm/dynamic.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions integrations/vanilla/snap/esm/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
import { optionalChaining } from "./utils.js";
export {
optionalChaining
};
//# sourceMappingURL=index.js.map
export { optionalChaining };
1 change: 0 additions & 1 deletion integrations/vanilla/snap/esm/index.js.map

This file was deleted.

13 changes: 7 additions & 6 deletions integrations/vanilla/snap/esm/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integrations/vanilla/snap/esm/utils.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions integrations/vanilla/tests/build.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { readFileSync, readdirSync } from 'node:fs'
import { existsSync, readFileSync, readdirSync } from 'node:fs'
import { fileURLToPath } from 'node:url'
import { dirname, resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
Expand All @@ -22,19 +22,23 @@ describe('check Vanilla build output', () => {
it('should build the same ESM output', () => {
files.forEach((file) => {
esmExtensions.forEach((ext) => {
expect(
readFileSync(`${rootDir}/dist/esm/${file}${ext}`).toString(),
).toMatchFileSnapshot(`${rootDir}/snap/esm/${file}${ext}`)
const filePath = `${rootDir}/dist/esm/${file}${ext}`
if (!existsSync(filePath)) return
expect(readFileSync(filePath).toString()).toMatchFileSnapshot(
`${rootDir}/snap/esm/${file}${ext}`,
)
})
})
})

it('should build the same CJS output', () => {
files.forEach((file) => {
cjsExtensions.forEach((ext) => {
expect(
readFileSync(`${rootDir}/dist/cjs/${file}${ext}`).toString(),
).toMatchFileSnapshot(`${rootDir}/snap/cjs/${file}${ext}`)
const filePath = `${rootDir}/dist/cjs/${file}${ext}`
if (!existsSync(filePath)) return
expect(readFileSync(filePath).toString()).toMatchFileSnapshot(
`${rootDir}/snap/cjs/${file}${ext}`,
)
})
})
})
Expand Down
9 changes: 9 additions & 0 deletions integrations/vue/snap/cjs/App.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const require__plugin_vue_export_helper = require("./_virtual/_plugin-vue_export-helper.cjs");
const require_App_vue_vue_type_script_setup_true_lang = require("./App.vue_vue_type_script_setup_true_lang.cjs");
;/* empty css */
//#region src/App.vue
var App_default = /* @__PURE__ */ require__plugin_vue_export_helper.default(require_App_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-57d0a178"]]);
//#endregion
exports.default = App_default;

//# sourceMappingURL=App.cjs.map
1 change: 1 addition & 0 deletions integrations/vue/snap/cjs/App.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions integrations/vue/snap/cjs/App.vue.cjs

This file was deleted.

1 change: 0 additions & 1 deletion integrations/vue/snap/cjs/App.vue.cjs.map

This file was deleted.

13 changes: 0 additions & 13 deletions integrations/vue/snap/cjs/App.vue2.cjs

This file was deleted.

1 change: 0 additions & 1 deletion integrations/vue/snap/cjs/App.vue2.cjs.map

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const require_HelloWorld = require("./components/HelloWorld.cjs");
let vue = require("vue");
//#region src/App.vue?vue&type=script&setup=true&lang.ts
var App_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
__name: "App",
setup(__props) {
return (_ctx, _cache) => {
return (0, vue.openBlock)(), (0, vue.createBlock)(require_HelloWorld.default, { msg: "Vite + Vue" });
};
}
});
//#endregion
exports.default = App_vue_vue_type_script_setup_true_lang_default;

//# sourceMappingURL=App.vue_vue_type_script_setup_true_lang.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 7 additions & 9 deletions integrations/vue/snap/cjs/_virtual/_plugin-vue_export-helper.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
"use strict";
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
//#region \0plugin-vue:export-helper
var _plugin_vue_export_helper_default = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) target[key] = val;
return target;
};
module.exports = _export_sfc;
//# sourceMappingURL=_plugin-vue_export-helper.cjs.map
//#endregion
exports.default = _plugin_vue_export_helper_default;

This file was deleted.

8 changes: 8 additions & 0 deletions integrations/vue/snap/cjs/components/HelloWorld.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const require_HelloWorld_vue_vue_type_script_setup_true_lang = require("./HelloWorld.vue_vue_type_script_setup_true_lang.cjs");
;/* empty css */
//#region src/components/HelloWorld.vue
var HelloWorld_default = /* @__PURE__ */ require("../_virtual/_plugin-vue_export-helper.cjs").default(require_HelloWorld_vue_vue_type_script_setup_true_lang.default, [["__scopeId", "data-v-1d5be6d4"]]);
//#endregion
exports.default = HelloWorld_default;

//# sourceMappingURL=HelloWorld.cjs.map
1 change: 1 addition & 0 deletions integrations/vue/snap/cjs/components/HelloWorld.cjs.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading