Ensure that brave-ui and brave-core use the same styled-components modules (and same context singletons)
This commit is contained in:
@@ -19,7 +19,10 @@ module.exports = async ({ config, mode }) => {
|
||||
})
|
||||
config.resolve.alias = {
|
||||
...config.resolve.alias,
|
||||
'brave-ui': path.resolve(__dirname, '../node_modules/brave-ui/src')
|
||||
'brave-ui': path.resolve(__dirname, '../node_modules/brave-ui/src'),
|
||||
// Force same styled-components module for brave-core and brave-ui
|
||||
// which ensure both repos code use the same singletons, e.g. ThemeContext.
|
||||
'styled-components': path.resolve(__dirname, '../node_modules/styled-components'),
|
||||
}
|
||||
config.resolve.extensions.push('.ts', '.tsx')
|
||||
return config
|
||||
|
||||
@@ -16,7 +16,10 @@ module.exports = (env, argv) => ({
|
||||
resolve: {
|
||||
extensions: ['.js', '.tsx', '.ts', '.json'],
|
||||
alias: {
|
||||
'brave-ui': path.resolve(__dirname, '../../node_modules/brave-ui/src')
|
||||
'brave-ui': path.resolve(__dirname, '../../node_modules/brave-ui/src'),
|
||||
// Force same styled-components module for brave-core and brave-ui
|
||||
// which ensure both repos code use the same singletons, e.g. ThemeContext.
|
||||
'styled-components': path.resolve(__dirname, '../../node_modules/styled-components'),
|
||||
},
|
||||
// For explanation of "chromeapp", see:
|
||||
// https://github.com/brave/brave-browser/issues/5587
|
||||
|
||||
Reference in New Issue
Block a user