1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-30 11:24:21 +01:00
fab-manager/config/webpack/environment.js
2020-09-16 15:38:07 +02:00

33 lines
1.0 KiB
JavaScript

const { environment } = require('@rails/webpacker');
const htmlErb = require('./loaders/html_erb');
const jsErb = require('./loaders/js_erb');
const sass = require('./loaders/sass');
const sassErb = require('./loaders/sass_erb');
const html = require('./loaders/html');
const fonts = require('./loaders/fonts');
const exposeApp = require('./loaders/expose_app');
const imports = require('./loaders/imports');
const webpack = require('webpack');
environment.plugins.prepend('Provide', new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery',
Hone: 'hone',
Tether: 'tether'
}));
environment.loaders.prepend('js-erb', jsErb);
environment.loaders.prepend('html-erb', htmlErb);
environment.loaders.prepend('sass-erb', sassErb);
environment.loaders.append('html', html);
environment.loaders.append('sass', sass);
environment.loaders.append('fonts', fonts);
environment.loaders.append('expose-app', exposeApp);
environment.loaders.append('imports', imports);
environment.splitChunks();
module.exports = environment;