Skip to content

Commit

Permalink
Merge pull request #43 from vladislav805/fix-detect-map-files
Browse files Browse the repository at this point in the history
Fix detection map files when asset name has a query string
  • Loading branch information
neSpecc authored May 28, 2024
2 parents f03c9f0 + 7624fa5 commit a3dc5f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hawk.so/webpack-plugin",
"version": "1.0.1",
"version": "1.0.2",
"description": "Webpack plugin for sending source-maps to the Hawk",
"main": "src/index.js",
"repository": "https://github.com/codex-team/hawk.webpack.plugin.git",
Expand Down
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ class HawkWebpackPlugin {
const outputPath = compilation.outputOptions.path;

Object.keys(compilation.assets).forEach(name => {
if (name.split('.').pop() === 'map') {
const filename = name.split('?')[0];
const extension = filename.split('.').pop();

if (extension === 'map') {
maps.push({
name,
path: path.join(outputPath, name),
Expand Down

0 comments on commit a3dc5f0

Please sign in to comment.