
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
local-mock-h5
Advanced tools
English | 简体中文
A h5 debug plugin for eruda and vConsole.
yarn add local-mock-h5
// #!if ENV === "development"
import eruda from 'eruda'
import { erudaLocalMock } from 'local-mock-h5'
eruda.init()
const localMockplugin = erudaLocalMock(eruda, {
state: '0',
proxy: 'http://localhost:8080',
})
eruda.add(localMockplugin)
// #!endif
// #!if ENV === "development"
import VConsole from 'vconsole'
import { vconsoleLocalMock } from 'local-mock-h5'
const vconsole = new VConsole()
const localMockplugin = vconsoleLocalMock(VConsole, {
state: '0',
proxy: 'http://localhost:8080',
})
vconsole.addPlugin(localMockplugin)
// #!endif
devServer
Since the entry file of 'devServer' is loaded in the domain name, you need to configure cross-origin and configure publicPath to load local static resources.
{
"devServer": {
"publicPath": "http://localhost:8080",
"port": 8080,
"headers": {
"Access-Control-Allow-Origin": "*"
}
}
}
publicPath
and proxy
change to http://{ip}:{port}
, such as: http://192.168.1.10:8080
Because the page resources of lcoalhost:8080 cannot be accessed on the mobile machine
FAQs
A h5 debug plugin for eruda and vConsole.
The npm package local-mock-h5 receives a total of 0 weekly downloads. As such, local-mock-h5 popularity was classified as not popular.
We found that local-mock-h5 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.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.