reload-page
v0.1.7
Published
After the front end releases, the page can be refreshed automatically.
Downloads
4
Readme
reload-page
After the front end releases, the page can be refreshed automatically.
Use
npm install reload-page
// main.js/index.js
import { spaUpdate } from 'reload-page';
spaUpdate()
Set Version
The version file needs to be generated and released to the production file along with the packaged file directory
Vite
// vite.config.js
import setVersionFile from 'reload-page/src/version';
const path = require('path')
export default defineConfig({
plugins: [
setVersionFile(path.resolve(__dirname, "./public")),
]
})
Vue CLI
// vue.config.js
const setVersionFile = require('reload-page/src/version')
const path = require('path')
module.exports = defineConfig({
chainWebpack() {
setVersionFile(path.resolve(__dirname, "./public"))
}
})
webpack
// config
const setVersionFile = require('reload-page/src/version')
const path = require('path')
module.exports = {
plugins: [setVersionFile(path.resolve(__dirname, "./public"))],
}
License
The project is released under the MIT license.
Contact
The project's website is located at https://github.com/chzc0/reload-page
Author: Chen, Zhi-Cheng ([email protected])