Skip to content

Commit

Permalink
Fixes #25882 - compile extra bundles during plugin compile
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsherrill authored and tbrisker committed Jan 22, 2019
1 parent 9d7c4d2 commit 202c65d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ module.exports = env => {
if (env && env.pluginName !== undefined) {
var pluginEntries = {};
pluginEntries[env.pluginName] = plugins['entries'][env.pluginName];
for (var entry of plugins['entries']) {
if (entry.startsWith(env.pluginName + ":")) {
pluginEntries[entry] = plugins['entries'][entry]
}
};

var outputPath = path.join(plugins['plugins'][env.pluginName]['root'], 'public', 'webpack');
var jsFilename = production ? env.pluginName + '/[name]-[chunkhash].js' : env.pluginName + '/[name].js';
var cssFilename = production ? env.pluginName + '/[name]-[chunkhash].css' : env.pluginName + '/[name].css';
Expand Down
2 changes: 1 addition & 1 deletion script/plugin_webpack_directories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def log_plugin(plugin_name)
def entry_name(plugin_name, entry)
prefix = File.basename(entry).gsub(/[_]?index.js$/, '')
if prefix != ''
"#{plugin_name}_#{prefix}"
"#{plugin_name}:#{prefix}"
else
plugin_name
end
Expand Down

0 comments on commit 202c65d

Please sign in to comment.