mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2024-11-25 19:05:46 +01:00
591bfbbbc6
* ⚰️ Remove `package-lock.json` to avoid conflicts with Yarn * ⚰️ Remove `jwt.ts` * 🏗️ Setup Rollup with entry module `package.json` files and use named exports exclusively for compatibility with CommonJS * ⬆️ Use `file:..` instead of `link:..` in demo app to test local installation * 🏷️ Export types as individual files to avoid protected access errors * 🚨 Explicit `export types` * 💚 Use ESBuild to bundle with Rollup, update Rollup deps and types * 🐛 Remove usage of SvelteKit modules Disable implicitly updating session, routing and getting redirect URL from SvelteKit modules due to missing exports.
29 lines
583 B
JavaScript
29 lines
583 B
JavaScript
import multiInput from "rollup-plugin-multi-input";
|
|
import packageJson from "./package.json";
|
|
import esbuild from "rollup-plugin-esbuild";
|
|
|
|
const globals = {
|
|
...packageJson.dependencies,
|
|
...packageJson.devDependencies,
|
|
};
|
|
|
|
export default [
|
|
{
|
|
input: ["src/**/*.ts"],
|
|
output: {
|
|
dir: "dist",
|
|
sourcemap: true,
|
|
format: "cjs",
|
|
},
|
|
plugins: [
|
|
esbuild(),
|
|
multiInput(),
|
|
],
|
|
external: [
|
|
...Object.keys(globals),
|
|
"@sveltejs/kit/assets/runtime/app/navigation",
|
|
"@sveltejs/kit/assets/runtime/app/stores",
|
|
],
|
|
},
|
|
];
|