Last active
November 23, 2018 16:39
-
-
Save seogi1004/f4cc3ffc7b3ea7f25d7d11cae8070f83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
return { | |
... | |
module: { | |
rules: [].concat([ env == 'production' ? | |
{ | |
test: /\.(jpe?g|png|gif|svg)$/i, | |
use: [{ | |
loader: 'file-loader', | |
options: { | |
name: '[hash].[ext]', | |
outputPath: '/images', | |
publicPath: '/bundles/images' | |
} | |
}] | |
} : { | |
test: /\.(jpe?g|png|gif|svg)$/i, | |
use: [{ | |
loader: 'url-loader', | |
options: { | |
limit: 1024 * 1024 | |
} | |
}] | |
} | |
]) | |
}, | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment