Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Correctly create built asset libraries #2546

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"contributors": [
"John Molakvoæ <[email protected]>"
],
"license": "AGPL-3.0-or-later",
"keywords": [
"nextcloud",
"files",
Expand All @@ -22,7 +23,6 @@
"type": "git"
},
"homepage": "https://github.com/nextcloud/viewer",
"license": "agpl",
"private": true,
"type": "module",
"scripts": {
Expand Down
35 changes: 19 additions & 16 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,24 @@ const plyrIcons = readFileSync(
{ encoding: 'utf8' },
)

export default createAppConfig(
{
main: 'src/main.js',
init: 'src/init.ts',
export default createAppConfig({
main: 'src/main.js',
init: 'src/init.ts',
}, {
replace: {
PLYR_ICONS: JSON.stringify(plyrIcons),
},
{
replace: {
PLYR_ICONS: JSON.stringify(plyrIcons),
},
minify: isProduction,
// ensure that every JS entry point has a matching CSS file
createEmptyCSSEntryPoints: true,
// Make sure we also clear the CSS directory
emptyOutputDirectory: {
additionalDirectories: ['css'],
},
minify: isProduction,
// create REUSE compliant license information for compiled assets
extractLicenseInformation: {
includeSourceMaps: true,
},
)
// disable BOM because we already have the `.license` files
thirdPartyLicense: false,
// ensure that every JS entry point has a matching CSS file
createEmptyCSSEntryPoints: true,
// Make sure we also clear the CSS directory
emptyOutputDirectory: {
additionalDirectories: ['css'],
},
})
Loading