A plugin that makes styled-components zero-runtime.
npm install @static-styled-plugin/webpack-plugin
// webpack.config.js
const { StaticStyledPlugin } = require('@static-styled-plugin/webpack-plugin')
module.exports = {
plugins: [
new StaticStyledPlugin({ themeFilePath: './src/theme.ts' }),
]
}
.css
files, such as css-loader
and style-loader
, as well.