Skip to content

Commit

Permalink
fix(build): inline css in all relevant entry points
Browse files Browse the repository at this point in the history
Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed May 14, 2024
1 parent ac09cb9 commit b63c513
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createAppConfig } from '@nextcloud/vite-config'
import path from 'path'
import { webpackStats } from 'rollup-plugin-webpack-stats';

const ENTRIES_TO_INCLUDE_CSS = ['text', 'public', 'viewer', 'editors']

const config = createAppConfig({
text: path.join(__dirname, 'src', 'main.js'),
Expand All @@ -14,7 +15,11 @@ const config = createAppConfig({
editors: path.join(__dirname, 'src', 'editor.js'),
init: path.join(__dirname, 'src', 'init.js'),
}, {
inlineCSS: true,
inlineCSS: {
jsAssetsFilterFunction: ({ name }) => {
return ENTRIES_TO_INCLUDE_CSS.includes(name)
}
},
config: {
css: {
modules: {
Expand Down

0 comments on commit b63c513

Please sign in to comment.