Skip to content

Commit

Permalink
Fix stylesheets loading
Browse files Browse the repository at this point in the history
  • Loading branch information
renchap committed Sep 22, 2023
1 parent 2f82d63 commit 5a5328e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions app/javascript/entrypoints/application.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { start } from '../mastodon/common';
import { loadLocale } from '../mastodon/load_locale';
import { loadLocale } from '../mastodon/locales/load_locale';
import { loadPolyfills } from '../mastodon/polyfills';

import 'styles/application.scss';

start();

loadPolyfills().then(loadLocale).then(async () => {
Expand Down
1 change: 0 additions & 1 deletion app/javascript/entrypoints/public.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { loadLocale, getLocale } from '../mastodon/locales';
import { loadPolyfills } from '../mastodon/polyfills';
import ready from '../mastodon/ready';

import "styles/application.scss";
import 'cocoon-js-vanilla';

start();
Expand Down
2 changes: 0 additions & 2 deletions app/javascript/entrypoints/share.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { start } from '../mastodon/common';
import { loadPolyfills } from '../mastodon/polyfills';
import ready from '../mastodon/ready';

import 'styles/application.scss';

start();

async function loaded() {
Expand Down
4 changes: 3 additions & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@

= vite_client_tag
= vite_react_refresh_tag
-# = vite_stylesheet_tag current_theme, media: 'all', crossorigin: 'anonymous'
= vite_stylesheet_tag "styles/application.scss", extname: false
- if current_theme != 'default'
= vite_stylesheet_tag "styles/#{current_theme}.scss", media: 'all', crossorigin: 'anonymous'
= csrf_meta_tags unless skip_csrf_meta_tags?
%meta{ name: 'style-nonce', content: request.content_security_policy_nonce }

Expand Down

0 comments on commit 5a5328e

Please sign in to comment.