mirror of
https://github.com/LukeHagar/sveltekit-adapters.git
synced 2025-12-09 12:47:48 +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()
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user