2020-10-19 14:40:18 +02:00
|
|
|
const path = require('path');
|
|
|
|
|
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: [
|
|
|
|
{
|
2020-10-19 14:40:18 +02:00
|
|
|
loader: 'auto-ngtemplate-loader',
|
|
|
|
options: {
|
|
|
|
pathResolver: (templatePath) => path.join(__dirname, `../../../app/frontend/templates${templatePath}`)
|
|
|
|
}
|
2020-09-22 14:20:47 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
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
|
|
|
};
|