Chatwoot/config/webpack/environment.js
Pranav Raj S 16fe912fbd
[Feature] Website live chat (#187)
Co-authored-by: Nithin David Thomas <webofnithin@gmail.com>
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2019-10-29 12:50:54 +05:30

24 lines
674 B
JavaScript

const { environment } = require('@rails/webpacker');
const { VueLoaderPlugin } = require('vue-loader');
const resolve = require('./resolve');
const vue = require('./loaders/vue');
environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin());
environment.loaders.prepend('vue', vue);
environment.loaders.append('audio', {
test: /\.(mp3)(\?.*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: 'audio/[name].[ext]',
},
});
environment.config.merge({ resolve });
environment.config.set('output.filename', chunkData => {
return chunkData.chunk.name === 'sdk'
? 'js/[name].js'
: 'js/[name]-[hash].js';
});
module.exports = environment;