Skip to content

Commit

Permalink
set different output path depending on mode
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Dec 14, 2023
1 parent d539baf commit 0d9cf8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,13 @@ const pluginConfig = function(plugin) {
);
});

if (config.mode == 'production') {
var outputPath = path.join(pluginRoot, 'public', 'webpack', pluginName);
} else {
var outputPath = path.join(__dirname, '..', 'public', 'webpack', pluginName);
}
config.output = {
path: path.join(pluginRoot, 'public', 'webpack', pluginName),
path: outputPath,
publicPath: '/webpack/' + pluginName + '/',
uniqueName: pluginName,
};
Expand Down

0 comments on commit 0d9cf8d

Please sign in to comment.