Skip to content

Instantly share code, notes, and snippets.

{
"screens": [
{
"id": "09cd1782-de21-4d14-ae5a-91d741784f30",
"name": "sm-min",
"width": "640",
"height": 812,
"userAgent": "Google Chrome",
"visible": true,
"highlighted": false
@meesvandongen
meesvandongen / next-assets-import.js
Created April 15, 2022 19:16
Updated next-assets-import for webpack 5
function withAssetsImport(nextConfig = {}) {
return {
...nextConfig,
images: {
disableStaticImages: true,
},
webpack(config, options) {
config.module.rules.push({
test: /\.(bmp|gif|jpe?g|png|svg|ttf|eot|woff2?|mp3|wav|mp4|ogg|webm)$/,
type: 'asset',
import React, { useEffect, useRef } from "react";
type TextInputProps = {
onChange: (value: string) => void;
value: string;
id?: string;
type: "text";
};
type NumberInputProps = {