style: 💄 css not inline
All checks were successful
repod / xml (push) Successful in 14s
repod / php (push) Successful in 1m2s
repod / nodejs (push) Successful in 1m23s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-10-17 16:29:49 +02:00
parent 7cd45d3539
commit 2dd9578257
4 changed files with 12 additions and 5 deletions

1
.gitignore vendored
View File

@ -9,5 +9,6 @@
/node_modules/ /node_modules/
/js/ /js/
/css/
/build/ /build/

View File

@ -27,6 +27,7 @@ class PageController extends Controller
*/ */
public function index(): TemplateResponse { public function index(): TemplateResponse {
Util::addScript(Application::APP_ID, Application::APP_ID.'-main'); Util::addScript(Application::APP_ID, Application::APP_ID.'-main');
Util::addStyle(Application::APP_ID, Application::APP_ID.'-main');
$csp = new ContentSecurityPolicy(); $csp = new ContentSecurityPolicy();
$csp->addAllowedImageDomain('*'); $csp->addAllowedImageDomain('*');

View File

@ -3,9 +3,9 @@
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "vue-tsc && vite build --mode production", "build": "vue-tsc && vite build",
"dev": "vite build --mode development", "dev": "vite --mode development build",
"dev:watch": "vite build --mode development --watch", "dev:watch": "vite --mode development build --watch",
"watch": "npm run dev:watch", "watch": "npm run dev:watch",
"lint": "eslint src", "lint": "eslint src",
"lint:fix": "eslint src --fix", "lint:fix": "eslint src --fix",

View File

@ -1,3 +1,4 @@
import { join, resolve } from 'path'
import { createAppConfig } from '@nextcloud/vite-config' import { createAppConfig } from '@nextcloud/vite-config'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vueDevTools from 'vite-plugin-vue-devtools' import vueDevTools from 'vite-plugin-vue-devtools'
@ -14,7 +15,11 @@ const config = defineConfig(({ mode }) => ({
export default createAppConfig( export default createAppConfig(
{ {
main: 'src/main.ts', main: resolve(join('src', 'main.ts')),
},
{
config,
createEmptyCSSEntryPoints: true,
thirdPartyLicense: false,
}, },
{ config, inlineCSS: true },
) )