Project

General

Profile

« Previous | Next » 

Revision a9861944

Added by Tomer Brisker almost 6 years ago

Fixes #23924 - Use consistent IDs for modules in webpack

This replaces the NamedModulesPlugin with a simplified version, that
strips the relative path part of the module ID up to the
node_modules/ part. This allows using consistent naming for modules,
even when running the packaging from different directories relative to
the node_modules folder (as is the case, for example, with katello and
foreman).

View differences:

config/webpack.config.js
var LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
var pluginUtils = require('../script/plugin_webpack_directories');
var vendorEntry = require('./webpack.vendor');
var SimpleNamedModulesPlugin = require('../webpack/simple_named_modules');
module.exports = env => {
// must match config.webpack.dev_server.port
......
},
sourceMap: false
}),
new webpack.NamedModulesPlugin(),
new SimpleNamedModulesPlugin(),
new webpack.optimize.ModuleConcatenationPlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new CompressionPlugin()

Also available in: Unified diff