Code Monkey home page Code Monkey logo

patch-package-in-action's Introduction

patch-package in action

# npm
$ npm i -S patch-package

# yarn v1
$ yarn add patch-package postinstall-postinstall
$ npm i -S typescript lodash
$ npm i -D ts-node rimraf
$ npm i -D app-node-env
$ npm i -D @types/node @types/lodash
# cjs 不支持 webpack tree-shaking, 只有 esm 才可以!
$ npm i -S lodash.tostring
$ npm i -D @types/lodash.tostring

# webpack plugin ???
$ npm i -S lodash-es
$ npm i -D @types/lodash-es

https://www.npmjs.com/package/@types/node

https://www.npmjs.com/package/@types/lodash

https://www.npmjs.com/package/rimraf

lodash.tostring

https://www.npmjs.com/package/lodash.tostring

https://www.npmjs.com/package/@types/lodash.tostring

lodash-es

https://www.npmjs.com/package/lodash-es

https://www.npmjs.com/package/@types/lodash-es

$ npm init -y

# $ tsc --init
$ npx tsc --init

dev

# cjs
$ yarn dev
$ yarn app

$ npx ts-node ./src/index.ts
$ npx ts-node ./src/app.ts


# esm
$ yarn dev-esm
$ yarn app-esm

$ npx ts-node-esm ./src/index.ts
$ npx ts-node-esm ./src/app.ts

refs

https://typestrong.org/ts-node/docs/imports/

TypeStrong/ts-node#1062 (comment)

https://github.com/xgqfrms/one-line-awesome-js-code/issues/1

https://www.cnblogs.com/xgqfrms/p/17242430.html#5160592

patch-package-in-action's People

Contributors

xgqfrms avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.