Add js-routes to use Route helpers in JavaScript
This commit is contained in:
@ -7,6 +7,7 @@ github.com/rails/webpacker/blob/master/docs/webpack.md
|
||||
const { environment } = require('@rails/webpacker')
|
||||
const { merge } = require('webpack-merge')
|
||||
const webpack = require('webpack')
|
||||
const erb = require('./loaders/erb')
|
||||
|
||||
// Add an additional plugin of your choosing : ProvidePlugin
|
||||
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
|
||||
@ -24,6 +25,8 @@ environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
|
||||
})
|
||||
)
|
||||
|
||||
environment.loaders.append('erb', erb)
|
||||
|
||||
const envConfig = module.exports = environment
|
||||
const aliasConfig = module.exports = {
|
||||
resolve: {
|
||||
|
Reference in New Issue
Block a user