Skip to content

Commit df7b538

Browse files
committed
Consolidate licenses into single file
1 parent 8a5e4d3 commit df7b538

3 files changed

Lines changed: 115 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"prettier": "^3.6.2",
5151
"prettier-plugin-svelte": "^3.4.0",
5252
"prettier-plugin-tailwindcss": "^0.6.13",
53+
"rollup-plugin-license": "^3.6.0",
5354
"semver": "^7.7.2",
5455
"svelte": "^5.34.9",
5556
"svelte-check": "^4.2.2",

pnpm-lock.yaml

Lines changed: 93 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vite.config.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { sveltekit } from '@sveltejs/kit/vite';
22
import tailwindcss from '@tailwindcss/vite';
33
import dns from 'dns/promises';
44
import { env } from 'process';
5+
import license from 'rollup-plugin-license';
56
import { defineConfig, loadEnv } from 'vite';
67
import devtoolsJson from 'vite-plugin-devtools-json';
78
import mkcert from 'vite-plugin-mkcert';
@@ -68,8 +69,27 @@ export default defineConfig(async ({ command, mode, isPreview }) => {
6869
build: {
6970
target: 'es2022',
7071
},
71-
plugins: [...(useLocalRedirect ? [mkcert()] : []), sveltekit(), tailwindcss(), devtoolsJson()],
72+
plugins: [
73+
...(useLocalRedirect ? [mkcert()] : []),
74+
sveltekit(),
75+
tailwindcss(),
76+
devtoolsJson(),
77+
license({
78+
thirdParty: {
79+
includePrivate: true,
80+
includeSelf: true,
81+
multipleVersions: true,
82+
output: {
83+
file: './.svelte-kit/output/client/LICENSES.txt', // TODO: This seems like a hack, check if theres a better way...
84+
},
85+
},
86+
}),
87+
],
7288
server: await getServerConfig(mode, useLocalRedirect),
7389
test: { include: ['src/**/*.{test,spec}.{js,ts}'] },
90+
esbuild: {
91+
legalComments: 'none',
92+
banner: '/*! For licenses information, see LICENSES.txt */',
93+
},
7494
});
7595
});

0 commit comments

Comments
 (0)