850a20f6ad
* fix: token image for chains / natives * feat: include native currency in select - Updates widgets swap state to use Currency (and deals with downstream updates) - Refactors logoURI code to a new lib/hooks/useCurrencyLogoURIs - Adds native currency to useQueryTokenList NB: This does not build because tests must be updated to use Currency (they currently use mock tokens) * test: update fixtures to use real currency * fix: data uri color extraction * fix: token img state * fix: use new array
26 lines
758 B
JavaScript
26 lines
758 B
JavaScript
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
const { DefinePlugin } = require('webpack')
|
|
|
|
// Renders the cosmos fixtures in isolation, instead of using public/index.html.
|
|
module.exports = (webpackConfig) => ({
|
|
...webpackConfig,
|
|
plugins: webpackConfig.plugins.map((plugin) => {
|
|
if (plugin instanceof HtmlWebpackPlugin) {
|
|
return new HtmlWebpackPlugin({
|
|
templateContent: '<body></body>',
|
|
})
|
|
}
|
|
if (plugin instanceof DefinePlugin) {
|
|
return new DefinePlugin({
|
|
...plugin.definitions,
|
|
'process.env': {
|
|
...plugin.definitions['process.env'],
|
|
REACT_APP_IS_WIDGET: true,
|
|
},
|
|
})
|
|
}
|
|
return plugin
|
|
}),
|
|
})
|