Skip to content

Commit

Permalink
fix: require image in js should not need .default when image is small
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Mar 3, 2020
1 parent 0279d54 commit 0458285
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/bundler-webpack/src/getConfig/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ export default async function getConfig(
.options({
limit: config.inlineLimit || 10000,
name: 'static/[name].[hash:8].[ext]',
// require 图片的时候不用加 .default
esModule: false,
fallback: {
loader: require.resolve('file-loader'),
options: {
Expand Down

0 comments on commit 0458285

Please sign in to comment.