Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
phaser-shim-loader
Advanced tools
A webpack loader that is meant to shim phaser so you can use it via require from npm. this resolves build errors
#Phaser-Shim-Loader
A webpack loader, that allows you to use the npm version of phaser with a normal build process.
As of phaser version 2.3.x, this module is no longer necessary to make phaser operate correctly with webpack!
You can also include the correct build criteria yourself:
This can be achieved by simply including the dependencies that are necessary for Phaser to work:
global.PIXI = require('pixi.js');
global.p2 = require('p2');
global.Phaser = require('phaser')
You will need to use the correct versions of both pixi and p2. At the imte of this writing, for phaser@2.3.0
uses
{
"phaser": "2.3.x",
"pixi.js": "2.x.x"
"p2": "0.6.x",
}
Also be aware that the npm module pixi
is the wrong module, you want pixi.js
, the official module
Compatible with phaser 2.2.x
Like any loader, you use it in your webpack.config file.
var path = require('path');
var phaserWebpackLoader = path.join(__dirname, '/node_modules/phaser-shim-loader'),
phaserWebpackDebugLoader = path.join(__dirname, '/node_modules/phaser-shim-loader/phaser=debug'),
//...
module: {
loaders: [
{
test: /phaser\.js$/i,
loader: 'phaser-webpack-loader'
},
{
test: /phaser-debug\.js$/i,
loader: 'phaser-debug-webpack-loader'
},
{
test: /\.frag$/i,
loader: 'gl-fragment-loader'
}
]
},
resolveLoader: {
alias: {
'phaser-webpack-loader': phaserWebpackLoader,
'phaser-debug-webpack-loader': phaserWebpackDebugLoader,
'gl-fragment-loader': glFragmentLoader
}
},
FAQs
A webpack loader that is meant to shim phaser so you can use it via require from npm. this resolves build errors
We found that phaser-shim-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.