Skip to content

webpack去缓存插件,解决小程序引入h5后缓存问题

License

Notifications You must be signed in to change notification settings

liquor96/noCachePlugin.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

noCachePlugin.js

webpack去缓存插件,解决小程序引入h5后缓存问题

安装

npm i no-cache-plugin -s

使用

在vue.config.js中使用

const { defineConfig } = require('@vue/cli-service');
const NoCachePlugin = require('no-cache-plugin');

module.exports = defineConfig({
  ...
  configureWebpack: (config) => {
    // 生产环境配置
    if (process.env.NODE_ENV === "production") {
      config.plugins.push(new NoCachePlugin());
    }
  },
});

About

webpack去缓存插件,解决小程序引入h5后缓存问题

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published