Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@misk/common
Advanced tools
@misk/common
provides shared libraries, externals, and styles between @misk
modules.
@misk/common
$ yarn add @misk/common
Using the common vendors libraries and styles. We use copy-webpack-plugin
to copy the compiled vendor.js
and styles.js
files into build folder.
Install copy-webpack-plugin
npm i -D copy-webpack-plugin
Add the following to your webpack.config.js
const CopyWebpackPlugin = require('copy-webpack-plugin');
...
module.exports = {
mode
entry
...
plugins: [
new CopyWebpackPlugin(
[{ from: './node_modules/@misk/common/lib' }],
{ debug: 'info', copyUnmodified: true }
)
],
}
Add the following to your index.html
to import styles.js
and vendors.js
<body>
...
<!-- Misk Common Libraries -->
<script type="text/javascript" src="js/styles.js" async></script>
<script type="text/javascript" src="js/vendors.js" preload></script>
<!-- Other JS -->
</body>
Use @misk/common
externals to keep Webpack from bundling duplicate libraries and styles into your Misk module. Add the following to your webpack.config.js
.
const MiskCommon = require('@misk/common')
...
module.exports = {
mode
entry
...
externals: MiskCommon.externals,
}
From package.json
:
"@blueprintjs/core": "^3.0.1",
"@blueprintjs/icons": "^3.0.0",
"axios": "^0.18.0",
"connected-react-router": "^4.3.0",
"dayjs": "^1.7.4",
"history": "^4.7.2",
"immutable": "^3.8.2",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-helmet": "^5.2.0",
"react-hot-loader": "^4.3.3",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-router-redux": "^5.0.0-alpha.9",
"react-transition-group": "^2.2.1",
"redux": "^4.0.0",
"redux-saga": "^0.16.0"
"skeleton-css": "^2.0.4",
"styled-components": "^3.3.3"
import '../node_modules/@blueprintjs/core/lib/css/blueprint.css'
import '../node_modules/normalize.css/normalize.css'
import '../node_modules/skeleton-css/css/skeleton.css'
import './styles/misk-common.css'
#Adding a new package
yarn add {package}
to add the package to package.json
src/externals.ts
src/vendors.js
README.md
with a copy of the updated package.json
list of packageswebpack.config.js
: Exports common variables including MiskCommon.Externals
webpack.static.config.js
: Exports common styles filewebpack.vendor.config.js
: Exports common vendors library filewebpack.basetab.config.js
: Base config used for each tabFAQs
Misk-Web Common Libraries, Styles
We found that @misk/common demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.