Linaria rebuild twice issue demo
For more details see callstack/linaria#878
Reproduce steps
- Run
yarn
- Run
yarn start
- Un-comment/comment the line 9 in
src/App.js
from
const Title = styled.h1`
font-family: sans-serif;
font-size: 48px;
color: #f15f79;
/* font-weight: bold; */
`;
to
const Title = styled.h1`
font-family: sans-serif;
font-size: 48px;
color: #f15f79;
font-weight: bold;
`;
- Watch Webpack's log, the
Compiled successfully
output twice, which means Webpack rebuild twice.
Temporary fix
Un-comment this line in webpack.config.js
to fix the issue:
// { loader: require.resolve("./bugfix/replaceRequireRequestLoader") },