From 73b3fffdbe730c33480682c40e7e8271e75ddf59 Mon Sep 17 00:00:00 2001 From: hellekin Date: Sat, 23 Jan 2021 15:35:49 +0100 Subject: Move CSS to Webpack Using both the asset pipeline and webpack is confusing and leads to unpredictable results in production. This commit moves all (S)CSS to Webpack under `app/javascript/scss` so that we can test whether the development interface results in a consistent production deployment. In order to load the ForkAwesome fonts we used a long path: `$fa-font-path: "../../../node_modules/fork-awesome/fonts";` Not sure whether this works... --- app/javascript/packs/application.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/javascript/packs') diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 721b8c1..0ddfdb5 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -7,7 +7,6 @@ require("@rails/ujs").start() require("turbolinks").start() require("@rails/activestorage").start() - // Uncomment to copy all static images under ../images to the output folder and reference // them with the image_pack_tag helper in views (e.g <%= image_pack_tag 'rails.png' %>) // or the `imagePath` JavaScript helper below. @@ -15,11 +14,12 @@ require("@rails/activestorage").start() // const images = require.context('../images', true) // const imagePath = (name) => images(name, true) +import "../scss/application" + //= require leaflet //= require leaflet-defaulticon-compatibility //= require leaflet.markercluster import "controllers" -import "fork-awesome/scss/fork-awesome" -import "fork-awesome/fonts/forkawesome-webfont" -import "stylesheets/application" + + -- cgit v1.2.3