1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-03 14:24:23 +01:00
fab-manager/config/webpack/environment.js

19 lines
524 B
JavaScript
Raw Normal View History

const { environment } = require('@rails/webpacker');
const htmlErb = require('./loaders/html_erb');
const jsErb = require('./loaders/js_erb');
2020-09-09 11:54:49 +02:00
const html = require('./loaders/html');
const webpack = require('webpack');
2020-09-09 11:54:49 +02:00
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
}));
environment.loaders.prepend('js.erb', jsErb);
environment.loaders.prepend('html.erb', htmlErb);
2020-09-09 11:54:49 +02:00
environment.loaders.append('html', html);
2020-09-09 08:51:53 +02:00
environment.splitChunks();
module.exports = environment;