is using nuxt.js for a completed spa project a complete refactoring of the project?
is using nuxt.js for a completed spa project a complete refactoring of the project?
basically needs to be refactored, because a framework for framework, is relatively low-level;
Nuxt.js has its own set of rules and conventions, which results in substantial adjustments to the directory structure, routing and data loading strategy of the original Vue.js project.
if there are few pages that need to be SSR, and the real-time requirements of the page content are low, you may not necessarily need to adopt this solution, you can consider the pre-rendering plug-in of Vue.js ;
can also refer to official Vue HackerNews 2.0 project to implement Vue.js native SSR , which makes it more controllable, much less intrusive to existing projects, and obviously less refactoring effort
reference:
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, ...
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) ...
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...
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 ...
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. ...
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? ...
I need the js file in plugins or assets to call the mutation method add . How can I call it correctly? ...
I want to use this in asyncData () in the Nuxt.js project it is officially said that this cannot be used in asyncData (), but my business requirement is to send a variable managed by vuex to the server when the page is loaded. The data code is as foll...
this relative module was not found ...
I put the configuration file of axios in plugins axios.js with the following code: import axios from axios import qs from qs const hotName = location.hostname if (hotName === localhost ) { axios.defaults.baseURL = ` xxxx.com api` axios...
.eslintrc.js is configured as follows description: The problem with is plugin:vue essential . If you comment it out, vscode will work properly. npm run dev can run normally and will not report an error of export . Of course, an error ...
No response to interface requests in asyncData api.jsaxiosstatic: I put the request in mounted so that I can request it successfully ...
A new project that has just been completed takes into account the problem of seo after it is launched. It uses prerender-spa-plugin to pre-render the page, but the dynamic routing page can not achieve the rendering effect. More often, the meta informatio...
when users are not logged in, they enter the login page by default, while the login page has a "about us " button. Click to enter the page about us. Click on this.$router.,. Now the problem is to enter the page about us from the login page, refresh and ...
suppose that two modules an and b are defined in vuex, and how can action in SET_USER,a be called if there is a mutations method in b? I try to directly store.commit( SET_USER , user); but the prompt cannot find this mutations,. It seems that the c...
in the website built by nuxt.js, a request is sent in the asyncData method on the home page. The interface address is forwarded with nginx. The background log checks the returned data, but the front end does not receive the returned data. The website ca...
< H1 > the code is as follows < H1 > package.json { "name": "example-hello-world", "dependencies": { "nuxt": "latest" }, "scripts": { "dev": "nuxt", &...