当前位置: 首页 > 文档资料 > San CLI 中文文档 >

inspect : 查看 webpack 内置信息

优质
小牛编辑
131浏览
2023-12-01

查看 webpack rule

查看所有内置 webpack rules list

san inspect --rules
[
  'san',
  'js',
  'ejs',
  'html',
  'svg',
  'img',
  'media',
  'fonts',
  'css',
  'postcss',
  'less'
]

查看具体内置 webpack rule 信息

san inspect --rule postcss

查看 webpack plugin

查看所有内置 webpack plugins list

san inspect --plugins
[
  'san',
  'case-sensitive-paths',
  'define',
  'hmr',
  'no-emit-on-errors',
  'html-index',
  'san-html-index',
  'html-demo-store',
  'san-html-demo-store',
  'html-webpack-harddisk-plugin',
  'copy-webpack-plugin',
  'progress'
]

查看具体内置 webpack plugin 信息

san inspect --plugin copy-webpack-plugin
new CopyPlugin(
  {
    patterns: [
      {
        transform: function () { /* omitted long function */ },
        from: '/Users/baidu/Desktop/baidu/xxx/template',
        to: '/Users/baidu/Desktop/baidu/xxx/output/template',
        globOptions: {
          ignore: [
            'index.html',
            '.DS_Store',
            'index/index.tpl',
            'demo-store/index.tpl'
          ]
        }
      }
    ]
  }
)