npm_poc_v2
v0.0.11
Published
npx create-react-app my-app --template typescript npx storybook@latest init npm i styled-components @types/styled-components classnames npm install --save-dev prettier
Downloads
13
Readme
npx create-react-app my-app --template typescript npx storybook@latest init npm i styled-components @types/styled-components classnames npm install --save-dev prettier
npm i -D @rollup/plugin-commonjs @rollup/plugin-node-resolve @rollup/plugin-terser @rollup/plugin-typescript @svgr/rollup rollup rollup-plugin-dts rollup-plugin-peer-deps-external rollup-plugin-postcss postcss
make coofie with coocoa
create button
add Storybook Button
add module.css
add svg
add ThemeProvider
export styles and component
rollup build
add counter
add ReduxProvider
add tests (jest)
add "isolatedModules": false,
we have to use 'type' in -- export { Button, type ButtonProps } from "./components/Button/Button";
Cannot redeclare block-scoped variable 'ReactComponent'.ts(2451) react-app.d.ts(50, 16): 'ReactComponent' was also declared here.
/// --- XD
error: Import in body of module; reorder to top import/first
node_modules/rollup/dist/bin/rollup:1342 valueString ??= String(value); SyntaxError: Unexpected token '?' --- > node -v , Node.js 14.17.0 or later . (??=), which is a relatively new feature introduced in ECMAScript 2021 (ES12).
yarn add -D @rollup/plugin-url
@rollup/plugin-typescript TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.
[!] (plugin dts) RollupError: [plugin dts] src/index.types.ts: Failed to compile. Check the logs above. error TS2688: Cannot find type definition file for 'chai-as-promised'. The file is in the program because: Entry point of type library 'chai-as-promised' specified in compilerOptions error TS2688: Cannot find type definition file for 'mocha'. The file is in the program because: Entry point of type library 'mocha' specified in compilerOptions error TS2688: Cannot find type definition file for 'sinon-chai'. The file is in the program because: Entry point of type library 'sinon-chai' specified in compilerOptions
[!] RollupError: Could not resolve "./components/Button/Button.module.css" from "src/builder/index.ts"