Skip to content

Latest commit

 

History

History
executable file
·
104 lines (81 loc) · 2.18 KB

draft-pastebin-pieces.md

File metadata and controls

executable file
·
104 lines (81 loc) · 2.18 KB
title tags pinned created modified
draft-pastebin-pieces
draft
todo
true
2019-11-11T06:57:46.101Z
2020-07-30T13:52:49.242Z

draft-pastebin-pieces


"@pmmmwh/react-refresh-webpack-plugin": "^0.4.0-beta.7", "react-refresh": "^0.8.3",

const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');

new ReactRefreshWebpackPlugin(),

'react-refresh/babel',

  • webpack 5移除了node模块兼容

"crypto-browserify": "^3.12.0", "stream-browserify": "^3.0.0", "vm-browserify": "^1.1.2",

  • class extends
class B {
  print = () => {
    console.log('print b');
  }
}

class D extends B {
  print() {
    console.log('before-super-print');
    super.print();
    console.log('after-super-print');
    console.log('print d');
  }
}

const d = new D();
d.print();
d.__proto__.print()
// print b
// before-super-print
  • musicbrainz-rename
$if2(%albumartist%,%artist%)/
$if(%albumartist%,%album%/,)
$if($gt(%totaldiscs%,1),%discnumber%-,)$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist% - ,)%title%
 const renderButton = (Root: React.ElementType<any> = 'button') => (
    <Root
      ref={forwardRef}
      type={Root === 'button' ? 'button' : undefined}
      {...(rest as HTMLElementProps<any>)}
      {...commonProps}
    >
      <span
        className={css`
          // Usually for this to take effect, you would need the element to be
          // "positioned". Due to an obscure part of CSS spec, flex children
          // respect z-index without the position property being set.
          //
          // https://www.w3.org/TR/css-flexbox-1/#painting
          z-index: 1;
        `}
      >
        {children}
      </span>
    </Root>
  );

  if (usesCustomElement(props)) {
    return renderButton(props.as);
  }

  if (usesLinkElement(props)) {
    return renderButton('a');
  }

  return renderButton();