Browse Source

Fix for stylesheet split

closed-social-glitch-2
kibigo! 7 years ago
parent
commit
0a678cf377
4 changed files with 10 additions and 5 deletions
  1. +5
    -4
      app/javascript/glitch/components/settings/index.js
  2. +0
    -0
      app/javascript/glitch/components/settings/style.scss
  3. +1
    -0
      app/views/home/index.html.haml
  4. +4
    -1
      config/webpack/shared.js

+ 5
- 4
app/javascript/glitch/components/settings/index.js View File

@ -1,14 +1,15 @@
// Package imports //
// Package imports
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePropTypes from 'react-immutable-proptypes';
import { injectIntl, defineMessages, FormattedMessage } from 'react-intl'; import { injectIntl, defineMessages, FormattedMessage } from 'react-intl';
import './stylesheet';
// Our imports //
// Our imports
import SettingsItem from './item'; import SettingsItem from './item';
// Stylesheet imports
import './style';
const messages = defineMessages({ const messages = defineMessages({
layout_auto: { id: 'layout.auto', defaultMessage: 'Auto' }, layout_auto: { id: 'layout.auto', defaultMessage: 'Auto' },
layout_desktop: { id: 'layout.desktop', defaultMessage: 'Desktop' }, layout_desktop: { id: 'layout.desktop', defaultMessage: 'Desktop' },

app/javascript/glitch/components/settings/stylesheet.scss → app/javascript/glitch/components/settings/style.scss View File


+ 1
- 0
app/views/home/index.html.haml View File

@ -3,6 +3,7 @@
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json) %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
= javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous' = javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous'
= stylesheet_pack_tag 'application', media: 'all'
.app-holder#mastodon{ data: { props: Oj.dump(default_props) } } .app-holder#mastodon{ data: { props: Oj.dump(default_props) } }
%noscript %noscript

+ 4
- 1
config/webpack/shared.js View File

@ -44,7 +44,10 @@ module.exports = {
plugins: [ plugins: [
new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))), new webpack.EnvironmentPlugin(JSON.parse(JSON.stringify(env))),
new ExtractTextPlugin(env.NODE_ENV === 'production' ? '[name]-[hash].css' : '[name].css'),
new ExtractTextPlugin({
filename: env.NODE_ENV === 'production' ? '[name]-[hash].css' : '[name].css',
allChunks: true,
}),
new ManifestPlugin({ new ManifestPlugin({
publicPath: output.publicPath, publicPath: output.publicPath,
writeToFileEmit: true, writeToFileEmit: true,

Loading…
Cancel
Save