aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2021-01-23 15:35:49 +0100
committerhellekin <hellekin@cepheide.org>2021-01-23 15:35:49 +0100
commit73b3fffdbe730c33480682c40e7e8271e75ddf59 (patch)
tree94c60464d43c6d39150802e8110cf51be2c326ee /config
parentb54d7d8aa172f85d53f44b601e4e81660d148342 (diff)
downloadincommon-map-73b3fffdbe730c33480682c40e7e8271e75ddf59.tar.gz
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...
Diffstat (limited to 'config')
-rw-r--r--config/webpack/development.js3
-rw-r--r--config/webpacker.yml9
2 files changed, 6 insertions, 6 deletions
diff --git a/config/webpack/development.js b/config/webpack/development.js
index c5edff9..7c82317 100644
--- a/config/webpack/development.js
+++ b/config/webpack/development.js
@@ -2,4 +2,7 @@ process.env.NODE_ENV = process.env.NODE_ENV || 'development'
const environment = require('./environment')
+const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
+environment.plugins.append('BundleAnalyzerPlugin', new BundleAnalyzerPlugin())
+
module.exports = environment.toWebpackConfig()
diff --git a/config/webpacker.yml b/config/webpacker.yml
index 41a533a..a4b9a7a 100644
--- a/config/webpacker.yml
+++ b/config/webpacker.yml
@@ -6,18 +6,18 @@ default: &default
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
- check_yarn_integrity: true
+ check_yarn_integrity: false
webpack_compile_output: true
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
- resolved_paths: ['app/assets']
+ # resolved_paths: ['app/assets']
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
# Extract and emit a css file
- extract_css: false
+ extract_css: true
static_assets_extensions:
- .jpg
@@ -94,6 +94,3 @@ production:
# Cache manifest.json for performance
cache_manifest: true
-
- # Do not break the app please!
- check_yarn_integrity: false