Skip to content

Commit

Permalink
feat: use style-plugin to load images in css files
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jun 5, 2023
1 parent 1d4f3e4 commit 17bfa37
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rollup/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import dynamicImportVars from '@rollup/plugin-dynamic-import-vars'
import externalAssets from 'rollup-plugin-external-assets'
import globImport from 'rollup-plugin-glob-import'
import terser from '@rollup/plugin-terser'
import styles from 'rollup-plugin-styles'
import * as fs from 'fs'
import * as path from 'path'
import { fileURLToPath } from 'url'
Expand Down Expand Up @@ -673,7 +674,11 @@ export default (args: Record<string, string>): rollup.RollupOptions[] => {
return path.relative(VSCODE_DIR, id).replace(/[/.]/g, '_')
}
}),
externalAssets(['**/*.mp3', '**/*.wasm', '**/*.css']),
externalAssets(['**/*.mp3', '**/*.wasm']),
styles({
mode: 'inject',
minimize: true
}),
{
name: 'dynamic-import-polyfill',
renderDynamicImport (): { left: string, right: string } {
Expand Down Expand Up @@ -763,7 +768,7 @@ export default (args: Record<string, string>): rollup.RollupOptions[] => {
}, nodeResolve({
extensions: EXTENSIONS
}),
externalAssets(['**/*.mp3', '**/*.wasm', '**/*.css']),
externalAssets(['**/*.mp3', '**/*.wasm']),
{
name: 'cleanup',
renderChunk (code) {
Expand Down

0 comments on commit 17bfa37

Please sign in to comment.