Skip to content

Commit 85eecfd

Browse files
committed
chore(webpack): Convert image to Data URI (*.css, *.less)
See: webpack-contrib/css-loader#1337
1 parent 5a49db5 commit 85eecfd

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

build/webpack-configs/library/dev.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ module.exports = webpackConfig => merge(webpackConfig, {
1515

1616
module: {
1717
rules: [
18+
{
19+
test: /\.png$/,
20+
type: 'asset'
21+
},
1822
utils.styleLoaders({
1923
sourceMap: IS_ENABLE_SOURCE_MAP,
2024
extract: true,

build/webpack-configs/library/prod.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ module.exports = webpackConfig => merge(webpackConfig, {
1717

1818
module: {
1919
rules: [
20+
{
21+
test: /\.png$/,
22+
type: 'asset'
23+
},
2024
utils.styleLoaders({
2125
sourceMap: ENABLE_SOURCE_MAP,
2226
extract: true,

0 commit comments

Comments
 (0)