Skip to content
This repository has been archived by the owner on Sep 29, 2022. It is now read-only.

Flashcard styling issue in production #148

Merged
merged 2 commits into from
Feb 24, 2020
Merged

Conversation

vishaltelangre
Copy link
Contributor

This is a follow up on #147.

@@ -1,6 +1,8 @@
import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import Flippy, { FrontSide, BackSide } from "react-flippy";
import "react-flippy/dist/styles.css";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference: sbayd/react-flippy#7.

@@ -45,6 +45,7 @@

<%= javascript_pack_tag 'application' %>

<%= stylesheet_pack_tag 'application' %>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that Webpacker does require NPM packages' styles in the development environment but requires this explicit tag in the production environment. The reference here - rails/webpacker#2059.

With this, not sure if the explicit import of the CSS file in the above React component is even needed with this change or not. It doesn't hard if we keep both the changes though.

@teampolyglot teampolyglot merged commit b2f5144 into master Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants