1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00
fab-manager/config/webpack/loaders/js_erb.js

20 lines
411 B
JavaScript
Raw Normal View History

2020-09-09 11:54:49 +02:00
module.exports = {
test: /\.js\.erb$/,
enforce: 'pre',
exclude: /node_modules/,
2020-09-22 14:20:47 +02:00
use: [
{
loader: 'auto-ngtemplate-loader',
options: {
pathResolver: (p) => p.replace(/src\/javascript\/.*$/, 'templates')
}
},
{
loader: 'rails-erb-loader',
options: {
runner: (/^win/.test(process.platform) ? 'ruby ' : '') + 'bin/rails runner'
}
2020-09-09 11:54:49 +02:00
}
2020-09-22 14:20:47 +02:00
]
2020-09-09 11:54:49 +02:00
};