New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

@heisea/navim

Package Overview
Dependencies
Maintainers
5
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@heisea/navim

服务于single-spa框架工程的打包库。基于webpack5的vue工程打包工具库。

npmnpm
Version
0.1.2
Version published
Weekly downloads
85
-5.56%
Maintainers
5
Weekly downloads
 
Created
Source

Navim

服务于single-spa框架工程的打包库。基于webpack5的vue工程打包工具库。

开发注意事项

  • 如果terser-webpack-plugin压缩启用swc的话工程依赖必须要有@swc/core包,如果没有的话在使用navim的过程中会报@swc/core无法找到。

环境变量

目前提供的环境为三种:分别是production、test、pre

  • .env文件会在所有环境下载入
  • .env.local文件会在所有环境下载入
  • .env.[mode]文件会在指定的环境下载入 另外navim会自动注入构建的时间戳,process.env.timer

proxy的配置

约定文件目录为 build/config.js

module.exports = {
  proxyTable: {}
}

navim.config.js

此配置文件支持函数形式和对象形式,如果为函数形式则参数为NODE_ENV的值,分别为development和production

配置说明:

  • entry 打包的入口js文件
  • library library名称,在微前端模式下对应的为运用的名字,例如:navbar
  • styleResourcesLoaderPatterns 全局注入的less变量文件地址类型为数组
  • copyWebpackPluginPatterns copy-webpack-plugin的配置属性,指定要拷贝的文件,[{from: ${cwd()}/src/file, to: ${cwd()}/dist}]

FAQs

Package last updated on 02 Jan 2024

Related posts