30
loading...
This website collects cookies to deliver better user experience
yarn add teaful-devtools
Use the bridge: import 'teaful-devtools'
(~200 B) Must be the first import.
import 'teaful-devtools'
import { render } from 'preact';
import App from './components/App';
render(<App />, document.getElementById('root'));
Open the DevTools and try it.
teaful-devtools
during development and save those precious bytes in a production build.// Must be the first import
if (process.env.NODE_ENV==='development') {
// Must use require here as import statements are only allowed
// to exist at top-level.
require("teaful-devtools");
}
import { render } from 'preact';
import App from './components/App';
render(<App />, document.getElementById('root'));
NODE_ENV
variable to the correct value in your build tool.