-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adrienne / added svg bundling for wallets #9871
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ module.exports = function (env) { | |
{ | ||
loader: 'css-loader', | ||
options: { | ||
url: false, | ||
url: (_, resourcePath) => resourcePath.includes('packages/wallets'), | ||
}, | ||
}, | ||
{ | ||
|
@@ -139,7 +139,24 @@ module.exports = function (env) { | |
}, | ||
{ | ||
test: /\.svg$/, | ||
exclude: /node_modules|public\//, | ||
issuer: /\/packages\/wallets\/.*(\/)?.*.scss/, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
exclude: /node_modules/, | ||
include: /public\//, | ||
type: 'asset/resource', | ||
generator: { | ||
filename: 'appstore/wallets/public/[name].[contenthash][ext]', | ||
}, | ||
}, | ||
{ | ||
test: /\.svg$/, | ||
issuer: /\/packages\/wallets\/.*(\/)?.*.tsx/, | ||
exclude: /node_modules/, | ||
include: /public\//, | ||
use: svg_loaders, | ||
}, | ||
{ | ||
test: /\.svg$/, | ||
exclude: [/node_modules|public\//], | ||
use: svg_loaders, | ||
}, | ||
], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.icon { | ||
width: 100px; | ||
height: 100px; | ||
background-image: url('./public/ic-appstore-deriv-logo.svg'); | ||
background-size: cover; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set url resolution for CSS to
true
only when bundling up wallets package, this ensures that the change only affects wallets packageThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required otherwise the
url
in the css will not be resolved to the path in the bundle