Skip to content

A webpack plugin of eruda to help you develop mobile app

Notifications You must be signed in to change notification settings

bobsam/eruda-webpack-plugin

 
 

Repository files navigation

English | 中文

eruda-webpack-plugin

A webpack plugin of eruda to help you develop mobile app

How to use

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

Using eruda's plugin

new ErudaWebapckPlugin({
  plugins: ['fps', 'timing']
})

Options

force

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
})

tool

Choose which eruda's tools you want, by default all will be added.

new ErudaWebpackPlugin({
  tool: ['console', 'elements']
})

plugins

add eruda's plugin

new ErudaWebapckPlugin({
  plugins: ['fps', 'timing']
})

About

A webpack plugin of eruda to help you develop mobile app

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%