demarches-normaliennes/config/webpack/environment.js

21 lines
718 B
JavaScript
Raw Normal View History

2018-10-09 11:32:27 +02:00
const path = require('path');
2018-09-12 10:40:12 +02:00
const { environment } = require('@rails/webpacker');
2018-10-09 11:32:27 +02:00
const resolve = {
alias: {
'@utils': path.resolve(__dirname, '..', '..', 'app/javascript/shared/utils')
}
};
2019-04-25 16:30:51 +02:00
environment.splitChunks();
2018-10-09 11:32:27 +02:00
environment.config.merge({ resolve });
environment.loaders.get(
'nodeModules'
).exclude = /(?:@?babel(?:\/|\\{1,2}|-).+)|regenerator-runtime|core-js|^webpack$|^webpack-assets-manifest$|^webpack-cli$|^webpack-sources$|^@rails\/webpacker$|^mapbox-gl$|/;
// Uncoment next lines to run webpack-bundle-analyzer
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
// environment.plugins.append('BundleAnalyzer', new BundleAnalyzerPlugin());
2018-09-12 10:40:12 +02:00
module.exports = environment;