javascript - Compiling down to Vanilla JS for NPM package -


i'm using npm pack export local package use in projects. uses es6, jsx , other new features. when run npm install <tarball> in new project, gets unexpected token errors when tries import package. tried having prepublish script used webpack config file compile /dist , set package.json's main key dist/compiledpackage.js wasn't able import package either. want export react component use in other projects running npm install thatreactcomponenttarball. how can this?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

c++ - Fill edges and center of array/vector with different values -

sql - calculate weighted average for each day and id based on time intervals in PostgreSQL -