<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[weixin_37861326的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/weixin_37861326</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; weixin_37861326]]></copyright><item><title><![CDATA[Vue3项目运行Error: Cannot find module ‘vue-loader-v16/package.json‘问题处理]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/125961693</link><guid>https://blog.csdn.net/weixin_37861326/article/details/125961693</guid><author>weixin_37861326</author><pubDate>Sun, 24 Jul 2022 17:32:44 +0800</pubDate><description><![CDATA[查看这个依赖是在@vue_cli-plugin-typescript这个库中进行引入，大概率fork-ts-checker-webpack-plugin-v5这个是库的作者还在开发当中并没有发布的库。到这里，那么就好解决了，@vue/cli-plugin-typescript版本降级！1）@vue/cli-plugin-typescript降级，降级到～4.4.0版本"@vue/cli-plugin-typescript""~4.4.0",2）安装开发依赖vue-loader-v16。...]]></description><category></category></item><item><title><![CDATA[微信网页开发：微信内h5使用wx-open-launch-weapp打开小程序，微信内h5使用wx-open-launch-app打开App的方案]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/121560326</link><guid>https://blog.csdn.net/weixin_37861326/article/details/121560326</guid><author>weixin_37861326</author><pubDate>Fri, 26 Nov 2021 17:04:44 +0800</pubDate><description><![CDATA[微信网页开发：微信内h5使用wx-open-launch-weapp打开小程序，微信内h5使用wx-open-launch-app打开App的方案]]></description><category></category></item><item><title><![CDATA[vs code使用power mode设置鼠标光标动效]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/115357145</link><guid>https://blog.csdn.net/weixin_37861326/article/details/115357145</guid><author>weixin_37861326</author><pubDate>Wed, 31 Mar 2021 18:29:33 +0800</pubDate><description><![CDATA[记录一个开发的题外话。vs code编辑器使用插件 power mode来设置鼠标光标动效，如下：



1. vscode 安装 power mode插件



2. 打开vscode编辑器 文件 - 首选项 - 设置，设置界面

开启power mode插件



设置插件动效



就可以看到对应效果。
...]]></description><category></category></item><item><title><![CDATA[Vue项目优化实践，通过CDN引入依赖项文件，减少打包vendor.js大小]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/108075378</link><guid>https://blog.csdn.net/weixin_37861326/article/details/108075378</guid><author>weixin_37861326</author><pubDate>Tue, 18 Aug 2020 14:01:25 +0800</pubDate><description><![CDATA[在我们使用vue构建项目时，常有一个问题值得我们思考，我们该如何去减少我们打包出来的chunk大小？以下，是一个项目实例过程。

创建vue项目


npm init webpack vuepjt

在项目不进行任何配置时，直接build，让我们来看看打包出来的chunk大小


npm run build --report



咋一眼就发现vendor.js有120kb，让我们来看看为什么这个chunk这么大



大致分析一下，vendor.js这个chunk中vue,vue-router这两个库占用]]></description><category></category></item><item><title><![CDATA[使用rollup配置创建libary并发布至npm详尽流程]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/107487366</link><guid>https://blog.csdn.net/weixin_37861326/article/details/107487366</guid><author>weixin_37861326</author><pubDate>Tue, 21 Jul 2020 16:02:42 +0800</pubDate><description><![CDATA[全局安装rollup


npm install rollup --global

终端中使用rollup，如果有信息输出，则说明rollup安装成功。

初始rollup

创建main.js，并输入以下内容


const foo = "hello world."

export default function () {
  console.log(foo)
}


终端中使用：


rollup .\main.js --file bundle.js --format cjs

可以发现同级目录中输出]]></description><category></category></item><item><title><![CDATA[npm查看包的版本信息，npm查看包的最新版本，npm安装指定版本的包，npm升级指定的包，npm安装最新的包，npm查看已安装的包等等指令]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/107200604</link><guid>https://blog.csdn.net/weixin_37861326/article/details/107200604</guid><author>weixin_37861326</author><pubDate>Wed, 08 Jul 2020 11:06:17 +0800</pubDate><description><![CDATA[使用npm查看npm包的版本信息

如查看webpack的版本列表信息，方式1：


npm view webpack versions

输出结果



方式2：


npm info webpack

输出结果：



使用npm查看npm包的最新版本信息


npm view webpack version

使用npm安装指定版本的包

如安装express 4.11.0版本


npm i express@4.11.0 --save-dev

使用npm升级指定的包

如升级上一步安装的expre]]></description><category></category></item><item><title><![CDATA[webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/107067217</link><guid>https://blog.csdn.net/weixin_37861326/article/details/107067217</guid><author>weixin_37861326</author><pubDate>Wed, 01 Jul 2020 16:54:48 +0800</pubDate><description><![CDATA[在按照官方文档使用webpack内置插件，new webpack.optimize.UglifyJsPlugin(),进行项目打包后，发现如下的错：

Error: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead.

原因是，webpack在最新版本中删除了optimize内置的方法，需要我们该用其他插件来使用。解决目前遇到的问题，我们需要使用uglifyjs-]]></description><category></category></item><item><title><![CDATA[npm查看源地址以及更换源地址]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/107064092</link><guid>https://blog.csdn.net/weixin_37861326/article/details/107064092</guid><author>weixin_37861326</author><pubDate>Wed, 01 Jul 2020 15:09:54 +0800</pubDate><description><![CDATA[NPM


概述：

查看源地址：npm config get registry

设置源地址：npm config set registry https://registry.npm.taobao.org/

--------------------------------------------------------------------------------------

查看npm源地址


npm config get registry

输出结果：



更换npm源为淘宝镜像


//.]]></description><category></category></item><item><title><![CDATA[rollup开发依赖包(npm library)，解决引入外部依赖失败的有效方法]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/107006321</link><guid>https://blog.csdn.net/weixin_37861326/article/details/107006321</guid><author>weixin_37861326</author><pubDate>Sun, 28 Jun 2020 19:28:28 +0800</pubDate><description><![CDATA[在使用rollup进行library开发时，在库文件中使用了url模块，打包之后将生成的文件在项目页面中使用时，发现url竟然undefined。按照网上一堆使用rollup-plugin-node-resolve来解决的方法，发现均无效，目前已查到到有效的方式，使用第三方依赖：rollup-plugin-node-polyfills。

1）安装依赖


cnpm i rollup-plugin-node-polyfills --save-dev

2）配置plugins


import nodePol]]></description><category></category></item><item><title><![CDATA[js判断是安卓Android还是ios机型]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106982987</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106982987</guid><author>weixin_37861326</author><pubDate>Sat, 27 Jun 2020 15:14:34 +0800</pubDate><description><![CDATA[/**
 * 判断是否为安卓机型
 */
export function isAndroid() {
  let _ua = window.navigator.userAgent.toLocaleLowerCase()
  if (_ua.indexOf('android') &gt; -1 || _ua.indexOf('adr') &gt; -1) {
    return true
  } else {
    return false
  }
}

/**
 * 判断是否为ios机型
 */
ex.]]></description><category></category></item><item><title><![CDATA[如何在Vue中使用sass，以及Module build failed: TypeError: this.getResolve is not a function at Object.loader问题]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106921248</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106921248</guid><author>weixin_37861326</author><pubDate>Tue, 23 Jun 2020 13:16:04 +0800</pubDate><description><![CDATA[安装项目依赖：


cnpm install sass-loader node-sass vue-style-loader --D

webpack.base.conf.js配置loader


module.exports = {
  module: {
    rules: [
      // ...
      {
        test: /\.scss$/,
        loaders: ['style', 'css', 'sass']
      }
    ]
  },
}


tem]]></description><category></category></item><item><title><![CDATA[mac安装HomeBrew异常:error: RPC failed问题解决的有效方式]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106687992</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106687992</guid><author>weixin_37861326</author><pubDate>Thu, 11 Jun 2020 14:21:16 +0800</pubDate><description><![CDATA[问题描述

在安装HomeBrew时，会遇到下述报错：


fatal: unable to access 'https://github.com/Homebrew/brew/': Could not resolve host: github.com
Failed during: git fetch origin master:refs/remotes/origin/master --tags --force

网上会有很多解决方案，最后问题的指向都是我们无法连接到github.com。可以使用，ping ]]></description><category></category></item><item><title><![CDATA[修改使用create-react-app创建的React项目本地服务的端口port和host]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106661408</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106661408</guid><author>weixin_37861326</author><pubDate>Wed, 10 Jun 2020 11:12:32 +0800</pubDate><description><![CDATA[在使用create-react-app工具构建react项目时，我们可以不用关心项目的配置项。但，如果我们需要同时启动多个react项目时，我们会发现项目端口被占用了，因此我们该如何修改默认端口配置呢？

1. 弹出项目配置项

在我们构建项目时，使用


npm run eject 

弹出项目配置项

2. scripts文件夹start.js中修改配置


// Tools like Cloud9 rely on this.
const DEFAULT_PORT = parseInt(process.]]></description><category></category></item><item><title><![CDATA[react将文本渲染为html的方式]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106492900</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106492900</guid><author>weixin_37861326</author><pubDate>Tue, 02 Jun 2020 11:38:01 +0800</pubDate><description><![CDATA[如下述代码，使用属性：dangerouslySetInnerHTML，将内容渲染为html。


import React, { Component } from 'react'

class Header extends Component {
  constructor(props) {
    super(props)
  }
  state= {
    descTohtml: '&lt;h1&gt;渲染为html&lt;/h1&gt;'
  }
  render() {
    return (
]]></description><category></category></item><item><title><![CDATA[Chrome浏览器安装vue-devtools工具的方法]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106424872</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106424872</guid><author>weixin_37861326</author><pubDate>Fri, 29 May 2020 14:35:40 +0800</pubDate><description><![CDATA[1）github上下载vue-devtools库，使用git下载


git clone https://github.com/vuejs/vue-devtools

2）项目根目录下安装项目依赖


cd vue-devtools

yarn run build



3）打包之后的扩展程序文件在，packages/shell-chorme文件夹中



4）打开chorme浏览器，在浏览器搜索地址输入chrome://extensions/ ，再“加载已解压的扩展的程序”



加载刚刚打包出的文件..]]></description><category></category></item><item><title><![CDATA[react中使用路由react-router进行页面跳转的方式，以及参数传递方式]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106403793</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106403793</guid><author>weixin_37861326</author><pubDate>Thu, 28 May 2020 14:47:58 +0800</pubDate><description><![CDATA[方式一，使用withRouter，进行跳转


import React, { Component } from 'react'
import { withRouter } from 'react-router-dom'
import layoutCss from './header.module.scss'

class index extends Component {
  constructor(props) {
    super(props)
  }
  state = {
    menulis]]></description><category></category></item><item><title><![CDATA[如何使用IIS管理器上部署react项目，支持history和hash模式路由部署]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106374195</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106374195</guid><author>weixin_37861326</author><pubDate>Wed, 27 May 2020 10:43:44 +0800</pubDate><description><![CDATA[在windows上使用IIS管理器可以很方便部署我们的项目文件，前端往往是部署一些静态资源文件。当我们需要部署react项目打包之后的build文件夹中的代码时，我们该如何去操作呢？

前期准备

本文假设你已具备react的基本使用能力，以及你已经在你的设备上配置好了IIS管理器，并已经能独立创建网站。让我们开始我们的配置吧！

修改React项目打包配置

1）项目弹出配置


npm run eject

在webpack.config.js中我们关注一下打包输出文件的公共路径


output: {]]></description><category></category></item><item><title><![CDATA[一文彻底弄明白module.exports和exports的区别]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/106298071</link><guid>https://blog.csdn.net/weixin_37861326/article/details/106298071</guid><author>weixin_37861326</author><pubDate>Mon, 25 May 2020 10:19:55 +0800</pubDate><description><![CDATA[在我们使用nodejs引入模块时，我们往往在模块文件中可能会纠结module.exports和exports他们究竟是什么区别？为了彻底明白其区别，我们来看一个例子。在模块中，只输入下述三行代码：


// module.js
console.log('module', module)
console.log('module.exports', module.exports)
console.log('exports', exports)

用node运行module.js让我们直接来看输出结果：



这]]></description><category></category></item><item><title><![CDATA[使用create-react-app构建的react项目在IE浏览器打开白屏的问题解决]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/105481410</link><guid>https://blog.csdn.net/weixin_37861326/article/details/105481410</guid><author>weixin_37861326</author><pubDate>Mon, 13 Apr 2020 09:27:40 +0800</pubDate><description><![CDATA[我们在使用create-react-app创建react项目之后，将项目在IE11/10/9浏览器打开时，发现页面白屏，打开控制台发现如下报错：



出现此问题的原因是：create-react-app默认只支持现代浏览器，具体可参考https://create-react-app.dev/docs/supported-browsers-features/支持列表。为了解决支持IE11/10/9...]]></description><category></category></item><item><title><![CDATA[react中利用构造函数与利用class关键字创建组件的区别，以及使用的选择]]></title><link>https://blog.csdn.net/weixin_37861326/article/details/104317495</link><guid>https://blog.csdn.net/weixin_37861326/article/details/104317495</guid><author>weixin_37861326</author><pubDate>Fri, 14 Feb 2020 19:07:51 +0800</pubDate><description><![CDATA[在react中，我们通常在创建组件时有以下两种形式：


//class关键字创建组件

importReactfrom'react';
exportdefaultclassAppDemoextendsReact.Component{
render(){
return(
&lt;div&gt;demo&lt;/div&gt;
)
}
}...]]></description><category></category></item></channel></rss>