Create an alias for styled-components in Webpack for development

This commit is contained in:
Opender Singh 2020-08-12 13:51:37 +12:00
parent 1e424fc083
commit b26ce1cfdb

View File

@ -50,6 +50,7 @@ module.exports = {
// https://github.com/gaearon/react-hot-loader/tree/92961be0b44260d3d3f1b8864aa699766572a67c#linking
'react-hot-loader': path.resolve(path.join(__dirname, '../node_modules/react-hot-loader')),
'react': path.resolve(path.join(__dirname, '../node_modules/react')),
'styled-components': path.resolve(path.join(__dirname, '../node_modules/styled-components')),
'react-dom': path.resolve(path.join(__dirname, '../node_modules/@hot-loader/react-dom')),
},
extensions: ['.js', '.json'],