@antmjs/plugin-icestark

    1.19.2 • Public • Published

    @antmjs/plugin-icestark

    TaroH5支持飞冰的微前端框架

    为什么需要

    为了保证开发使用的框架保持一致,我们主要以Taro为核心,包括PC系统的构建也依赖Taro。PC应用比较庞大,也就实践出了这个临时方案

    安装

    yarn add @antmjs/plugin-icestark --dev

    使用

    文档参考icestark

    config/index.js

    const IceStarkPlugin = require('@antmjs/plugin-icestark')
    {
      h5: {
        webpackChain(chain) {
          chain
            .plugin('IceStarkPlugin')
            .use(new IceStarkPlugin({ libraryName: pkg.name }))
          chain.output.library(pkg.name).libraryTarget('umd').publicPath('//localhost:10086/')
        },
        devServer: {
          port: 10086,
          hot: true,
          host: '0.0.0.0',
          historyApiFallback: true,
          disableHostCheck: true,
          headers: {
            'Access-Control-Allow-Origin': '*', // 表示允许跨域
          },
        }
      }
    }

    Install

    npm i @antmjs/plugin-icestark

    DownloadsWeekly Downloads

    8

    Version

    1.19.2

    License

    MIT

    Unpacked Size

    9.13 kB

    Total Files

    6

    Last publish

    Collaborators

    • hisanshao