Skip to content

Commit

Permalink
Merge pull request #27 from smalruby/koshien
Browse files Browse the repository at this point in the history
fix: add png asset
  • Loading branch information
takaokouji authored Aug 19, 2024
2 parents d87221f + d08246f commit 13c1916
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ const nodeBuilder = new ScratchWebpackConfigBuilder(common)
}
})
.addModuleRule({
test: /\.mp3$/,
type: 'asset'
test: /\.(svg|png|wav|mp3|gif|jpg)$/,
resourceQuery: /^$/, // reject any query string
type: 'asset' // let webpack decide on the best type of asset
});

const webBuilder = new ScratchWebpackConfigBuilder(common)
Expand All @@ -45,8 +46,9 @@ const webBuilder = new ScratchWebpackConfigBuilder(common)
}
})
.addModuleRule({
test: /\.mp3$/,
type: 'asset'
test: /\.(svg|png|wav|mp3|gif|jpg)$/,
resourceQuery: /^$/, // reject any query string
type: 'asset' // let webpack decide on the best type of asset
})
.addModuleRule({
test: require.resolve('./src/index.js'),
Expand Down

0 comments on commit 13c1916

Please sign in to comment.