nuxt git-revision-webpack-plugin
nuxt git-revision-webpack-plugin
git-revision-webpack-plugin is a plug-in based on webpack. Its main function is to obtain the current git version number and branch information.
you need to install it in the project before using it: npm install-- save-dev git-revision-webpack-plugin
and then configure it in the configuration file nuxt.config.js of the nuxt project
const GitRevisionPlugin = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();
const webpack = require('webpack');
build: {
plugins: [
new webpack.DefinePlugin({
'process.VERSION': JSON.stringify(gitRevisionPlugin.version()),
'process.COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()),
'process.BRANCH': JSON.stringify(gitRevisionPlugin.branch()),
}),
],
},
I want to load the data on the first screen on the server, that is, there is still part of the return data, hidden in asyncData, and I want to render it on the client. How do I write this? ...
for the first time it s all wrong anyway. I followed nuxt.js s official tutorial-- ...
how do Vue projects built with Nuxt.js share header and footer files? only files with section contents are placed in the page directory. Navigation bars and footers and every time you jump to a new route, navigation doesn t have to be reloaded. Gods, ...
each time nuxt uses keep-alive, to switch pages, it will empty the data in data, which is inconsistent with the performance of keep-alive in normal vue-cli-built projects. for example, the asynchronously acquired data I loaded in list is switched to i...
current Nuxt projects need to be published to different environments corresponding to but the value obtained through process.env.NODE_ENV is not the value assigned here but production what is the reason for this? How can I get the desired result...
nuxt 1.4 uses keepAlive, in nuxt, but I find that when the page component is switched, the data in data will be reset and emptied when entering the interface . Is this his bug? if there is a problem with the setting, how can I modify the setting? ...
the packaged scripts are generated dynamically by nuxt. How to mark a global variable so that your business code can tell which command it is? (for example, the interface domain names of different commands are different) ...
after I install it using the documentation s npm installation method, I introduce a date selector as in the case, but the time is in English elementUI how to change this ...
ask nuxt.js s vue single file, how to make some vue scripts to be rendered by browser instead of server. if the pull-up load belongs to browser rendering through ajax, how to express the .vue single file in ssr mode. Please, everyone. I m in a hurry...
D: code nuxtjsdemo node_modules nuxt lib core middleware nuxt.js:72 const policies = this.options.render.csp.policies ? {...this.options.rende r.csp.policies} : null SyntaxError: Unexpected token ... platform environment nodejs 8.2.0 v...
add components with npm install v-distpicker add vendor: to nuxt.config.js [ axios , v vendor: distressed ] how to write in the vue interface, ask the great gods to save ...
report this error with pm2 logs main startup, but netstat-anp | grep port 80 is not occupied ...
my global variable configuration vue :@base-color-red less@ ...
I use nuxt to do a project that separates the front and rear ends, and uses docker to build the project independently. When the server needs generate to generate static files to access, and asyncData obtains the initial data, the data obtained by my loca...
I use the npm run dev command, but I use npm run generate to package and generate the dist folder, and open index.html to find that js is all invalid. When I first met vue, I asked for guidance. ...
because vue version 2.5 or above is required to use element-ui, this error is reported after updating the vue, refresh page separately. I really don t understand. links on the diagram ...
if you want to define a global less variable and then use it, how do you configure it ...
I have a configuration file in js format, and I don t want to read the configuration every time I have a request. (what if I configure it in cdn,? (not so good on the server Synchronize in the past) if I am writing a service like golang php c, I will c...
page: structure: index.vue homeindex.vue :homeindex.vuevue-awesome-swiper: ...
the project directory automatically generated by nuxt.js no longer has webpack.config.js, so how to configure things such as scss, less, autoprefixer, and url? ...