Skip to content

Instantly share code, notes, and snippets.

@joakimk
joakimk / webpacker-environment.js
Last active October 11, 2018 18:31
non-digested assets in webpack (e.g. non-stupid-digest-assets for webpacker)
// Didn't find anything on google for this so I wrote my own. Use as a starting point if you have a similar problem.
// Please write comments if there is a better way to do this (or solve the same problem in another way) in webpack.
// Contents of config/webpack/environment.js:
const { environment } = require('@rails/webpacker')
// Generate undigested assets for use in embedded javascript, emails, etc.
// We previously used non-stupid-digest-assets for this.