mirror of
https://github.com/LukeHagar/sveltekit-adapters.git
synced 2025-12-06 04:21:32 +00:00
Integrate @rollup/plugin-typescript into adapter-electron for TypeScript support
- Added @rollup/plugin-typescript as a dependency in package.json for TypeScript integration. - Updated index.js to include typescript in the Rollup build process. - Reflected the new dependency in pnpm-lock.yaml to ensure proper versioning and compatibility.
This commit is contained in:
@@ -6,6 +6,7 @@ import { rollup, watch as rollupWatch } from 'rollup';
|
||||
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import json from '@rollup/plugin-json';
|
||||
import typescript from '@rollup/plugin-typescript';
|
||||
|
||||
/**
|
||||
* Build an Electron entrypoint (main or preload) using Rollup
|
||||
@@ -21,7 +22,8 @@ async function buildEntryWithRollup(entry, outfile, external, isDev = false) {
|
||||
plugins: [
|
||||
nodeResolve({ preferBuiltins: true }),
|
||||
commonjs(),
|
||||
json()
|
||||
json(),
|
||||
typescript()
|
||||
]
|
||||
};
|
||||
const outputOptions = {
|
||||
@@ -114,7 +116,8 @@ export default function (opts = {}) {
|
||||
// @ts-ignore https://github.com/rollup/plugins/issues/1329
|
||||
commonjs({ strictRequires: true }),
|
||||
// @ts-ignore https://github.com/rollup/plugins/issues/1329
|
||||
json()
|
||||
json(),
|
||||
typescript()
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
"@rollup/plugin-commonjs": "^28.0.6",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.1",
|
||||
"@rollup/plugin-typescript": "^12.1.4",
|
||||
"cookie": "^0.6.0",
|
||||
"electron": "^28.0.0",
|
||||
"electron-is-dev": "^3.0.1",
|
||||
|
||||
25
pnpm-lock.yaml
generated
25
pnpm-lock.yaml
generated
@@ -222,6 +222,9 @@ importers:
|
||||
'@rollup/plugin-node-resolve':
|
||||
specifier: ^16.0.1
|
||||
version: 16.0.1(rollup@4.45.1)
|
||||
'@rollup/plugin-typescript':
|
||||
specifier: ^12.1.4
|
||||
version: 12.1.4(rollup@4.45.1)(tslib@2.8.1)(typescript@5.8.3)
|
||||
cookie:
|
||||
specifier: ^0.6.0
|
||||
version: 0.6.0
|
||||
@@ -1048,6 +1051,19 @@ packages:
|
||||
rollup:
|
||||
optional: true
|
||||
|
||||
'@rollup/plugin-typescript@12.1.4':
|
||||
resolution: {integrity: sha512-s5Hx+EtN60LMlDBvl5f04bEiFZmAepk27Q+mr85L/00zPDn1jtzlTV6FWn81MaIwqfWzKxmOJrBWHU6vtQyedQ==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
peerDependencies:
|
||||
rollup: ^2.14.0||^3.0.0||^4.0.0
|
||||
tslib: '*'
|
||||
typescript: '>=3.7.0'
|
||||
peerDependenciesMeta:
|
||||
rollup:
|
||||
optional: true
|
||||
tslib:
|
||||
optional: true
|
||||
|
||||
'@rollup/pluginutils@5.2.0':
|
||||
resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
@@ -4750,6 +4766,15 @@ snapshots:
|
||||
optionalDependencies:
|
||||
rollup: 4.45.1
|
||||
|
||||
'@rollup/plugin-typescript@12.1.4(rollup@4.45.1)(tslib@2.8.1)(typescript@5.8.3)':
|
||||
dependencies:
|
||||
'@rollup/pluginutils': 5.2.0(rollup@4.45.1)
|
||||
resolve: 1.22.10
|
||||
typescript: 5.8.3
|
||||
optionalDependencies:
|
||||
rollup: 4.45.1
|
||||
tslib: 2.8.1
|
||||
|
||||
'@rollup/pluginutils@5.2.0(rollup@4.45.1)':
|
||||
dependencies:
|
||||
'@types/estree': 1.0.8
|
||||
|
||||
Reference in New Issue
Block a user