-
-
Save 123ish/ee68ef88911f16ee879ec3ef0f7a07e9 to your computer and use it in GitHub Desktop.
Step-by-Step guide on how to move from Sprockets to Webpacker - erb.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config/webpack/loaders/erb.js | |
module.exports = { | |
test: /\.erb$/, | |
enforce: 'pre', | |
exclude: /node_modules/, | |
use: [{ | |
loader: 'rails-erb-loader', | |
options: { | |
runner: (/^win/.test(process.platform) ? 'ruby ' : '') + 'bin/rails runner' | |
} | |
}] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment