登峰造极境

  • WIN
    • CSharp
    • JAVA
    • OAM
    • DirectX
    • Emgucv
  • UNIX
    • FFmpeg
    • QT
    • Python
    • Opencv
    • Openwrt
    • Twisted
    • Design Patterns
    • Mysql
    • Mycat
    • MariaDB
    • Make
    • OAM
    • Supervisor
    • Nginx
    • KVM
    • Docker
    • OpenStack
  • WEB
    • ASP
    • Node.js
    • PHP
    • Directadmin
    • Openssl
    • Regex
  • APP
    • Android
  • AI
    • Algorithm
    • Deep Learning
    • Machine Learning
  • IOT
    • Device
    • MSP430
  • DIY
    • Algorithm
    • Design Patterns
    • MATH
    • X98 AIR 3G
    • Tucao
    • fun
  • LIFE
    • 美食
    • 关于我
  • LINKS
  • ME
Claves
长风破浪会有时,直挂云帆济沧海
  1. 首页
  2. Platforms
  3. WEB
  4. WebGL
  5. 正文

npm的vue-cli-plugin-jessibuca插件代码简析

2024-11-12
const path = require('path');
const HtmlWebpackTagsPlugin = require('html-webpack-tags-plugin');

const direction = path.dirname(require.resolve('jessibuca/package.json'))

module.exports = (api, options) => {
  api.chainWebpack(webpackConfig => {
    webpackConfig
      .plugin('copy')
      .tap(([config]) => {
        const c = config.concat([
          { from: path.resolve(direction, './dist/jessibuca.js'), to: '' },
          { from: path.resolve(direction, './dist/decoder.js'), to: '' },
          { from: path.resolve(direction, './dist/decoder.wasm'), to: '' },
        ])
        return [c];
      })

    webpackConfig
      .plugin('tag')
      .use(HtmlWebpackTagsPlugin, [
        {
          tags: ['jessibuca.js'],
          append: true
        }
      ])

    return webpackConfig;
  })
}
标签: 暂无
最后更新:2024-11-12

代号山岳

知之为知之 不知为不知

点赞
< 上一篇

COPYRIGHT © 2099 登峰造极境. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

蜀ICP备14031139号-5

川公网安备51012202000587号