0.1.7 • Published 8 months ago

reload-page v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

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 (chzc0@163.com)

0.1.7

8 months ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago