fix(frontend): CSS light-dark() が適用されない問題を修正 (#17523)

* fix(frontend): lightningcssのlight-darkのTranspilationを無効に (MisskeyIO#1243)

* fix deps

* Update Changelog

---------

Co-authored-by: まっちゃてぃー。 <56515516+mattyatea@users.noreply.github.com>
This commit is contained in:
かっこかり 2026-06-02 11:47:09 +09:00 committed by GitHub
commit 6f4f53382e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 30 additions and 7 deletions

View file

@ -49,6 +49,7 @@
"eslint-plugin-vue": "10.9.1",
"happy-dom": "20.9.0",
"intersection-observer": "0.12.2",
"lightningcss": "1.32.0",
"micromatch": "4.0.8",
"msw": "2.14.6",
"prettier": "3.8.3",

View file

@ -9,6 +9,7 @@ import meta from '../../package.json';
import packageInfo from './package.json' with { type: 'json' };
import pluginJson5 from './lib/vite-plugin-json5.js';
import { pluginRemoveUnrefI18n } from '../frontend-builder/rollup-plugin-remove-unref-i18n';
import { Features } from 'lightningcss';
const url = process.env.NODE_ENV === 'development' ? (yaml.load(await fsp.readFile('../../.config/default.yml', 'utf-8')) as any).url : null;
const host = url ? (new URL(url)).hostname : undefined;
@ -104,6 +105,9 @@ export function getConfig(): UserConfig {
},
css: {
lightningcss: {
exclude: Features.LightDark,
},
modules: {
generateScopedName(name, filename, _css): string {
const id = (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
@ -128,9 +132,9 @@ export function getConfig(): UserConfig {
build: {
target: [
'chrome116',
'firefox116',
'safari16',
'chrome130',
'firefox132',
'safari18.2',
],
manifest: 'manifest.json',
rolldownOptions: {

View file

@ -119,6 +119,7 @@
"estree-walker": "3.0.3",
"happy-dom": "20.9.0",
"intersection-observer": "0.12.2",
"lightningcss": "1.32.0",
"micromatch": "4.0.8",
"minimatch": "10.2.5",
"msw": "2.14.6",

View file

@ -16,6 +16,7 @@ import type { Options as SearchIndexOptions } from './lib/vite-plugin-create-sea
import pluginCreateSearchIndex from './lib/vite-plugin-create-search-index.js';
import pluginWatchLocales from './lib/vite-plugin-watch-locales.js';
import { pluginRemoveUnrefI18n } from '../frontend-builder/rollup-plugin-remove-unref-i18n.js';
import { Features } from 'lightningcss';
const url = process.env.NODE_ENV === 'development' ? (yaml.load(await fsp.readFile('../../.config/default.yml', 'utf-8')) as any).url : null;
const host = url ? (new URL(url)).hostname : undefined;
@ -142,6 +143,9 @@ export function getConfig(): UserConfig {
},
css: {
lightningcss: {
exclude: Features.LightDark,
},
modules: {
generateScopedName(name, filename, _css): string {
const id = (path.relative(__dirname, filename.split('?')[0]) + '-' + name).replace(/[\\\/\.\?&=]/g, '-').replace(/(src-|vue-)/g, '');
@ -166,9 +170,9 @@ export function getConfig(): UserConfig {
build: {
target: [
'chrome116',
'firefox116',
'safari16',
'chrome130',
'firefox132',
'safari18.2',
],
manifest: 'manifest.json',
rolldownOptions: {