English | 中文
A webpack plugin of eruda to help you develop mobile app
npm i --save-dev eruda-webpack-plugin
// webpack.config.js
const ErudaWebapckPlugin = reuire('eruda-webpack-plugin')
const HtmlWebpackPlutin = require('html-webpack-plugin')
const config = {
devServer: {
contentBase: path.join(__dirname, 'dist'),
port: 10000
},
mode: "development",
plugins: [
new HtmlWebpackPlutin({
template: path.resolve(__dirname, 'index.html')
}),
new ErudaWebapckPlugin()
]
}
Open http://localhost:1000
in your browser, you can use eruda
to debug your mobile app
new ErudaWebapckPlugin({
plugins: ['fps', 'timing']
})
eruda-webpack-plugin
only works in development
mode, if you need it in other modes, you can set force
as true
new ErudaWebpackPlugin({
force: true
})
Choose which eruda's tools you want, by default all will be added.
new ErudaWebpackPlugin({
tool: ['console', 'elements']
})
add eruda's plugin
new ErudaWebapckPlugin({
plugins: ['fps', 'timing']
})