Activities

MangoSeven

MangoSeven posted a new question

docs •

Why autoprefixer doesn't work?

Official website add autoprefixer . but autoprefixer doesn't work.
build: {
postcss: {
// 添加插件名称作为键,参数作为值
// 使用npm或yarn安装它们
plugins: {
'postcss-pxtorem': {
remUnit: 75
},
},
preset: {
// 更改postcss-preset-env 设置
autoprefixer: { grid: true }
}
}
}

davestewart

davestewart posted a new feature request

docs •

idea Make the API sections and examples more consistent and verbose where needed

What problem does this feature solve?

As a new Nuxt user, I found the configuration sections quite inconsistent:

  • some show the full config from export default { thing: { ... } } others just the block { ... }
  • some say "nuxt.config.js" others don't
  • some give full explanations, others don't

In the html.minify section, because there was no "full" example, I buggered about with various examples: 'html.minify': { ... }, html: { minify: {} }, and because of other docs online even htmlMinify but none seemed to work.

There there was code online and in the source about Nuxt's generate script and associated config (other than build).

Then I found out html minifier was a module, and needed to be included. When I added them, the feature half-worked:

As a new (but advanced) user, it's frustrating to thrash around on the margins but see intermittent progress.

Having sections like these fully documented and tested is critical.

What does the proposed changes look like?

Deciding what would be a good format:

  • file name
  • config format
  • examples
  • dependencies (if relevant)

and sticking to it.

Perhaps also having some way to review the docs / releases to see what should be updated.

WernerRaath

WernerRaath posted a new bug report

docs •

bug Nginx example requires commercial subscription

Reproduction link

https://nuxtjs.org/faq/nginx-proxy/#using-nginx-with-generated-pages-and-a-caching-proxy-as-fallback

Steps to reproduce

Apply this Nginx conf with an non-commercial Nginx service.

What is expected ?

Nginx should start up

What is actually happening?

Get this error:
nginx: [emerg] unknown directive "proxycachepurge" in /etc/nginx/conf.d/default.conf

Additional comments?

I would just recommend that you update the document to state that and Nginx commercial license is required as stated here: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_purge

WernerRaath

WernerRaath posted a new question

docs •

Nginx on static content only

This relates to the nginx-proxy.md example.

I am weighing up the difference between

  • serving the app via npm run start with Nginx pointing to it as the document describes, or
  • just serving up the dist folder behind Nginx.

Since I'm using Docker containers, I would like to try and just serve this web app up with one container instead of 2 for scaling purposes.

My application is a PWA that simply fetches, caches and displays data with some minor additional functionality.

Are there cons to serving it up behind Nginx only?

I have tested it behind Nginx only and everything works fine, but I don't know if there's any additional logic that serving it up via node provides.

The new Nginx (without all my API reverse proxies) looks like:

server {
    listen 80;
    server_name my.domain.name;

    gzip            on;
    gzip_types      text/plain application/xml text/css application/javascript;
    gzip_min_length 1000;
    location / {
        root               /usr/local/static/;
        index              index.html;
    }
}
techieoriname

techieoriname posted a new question

docs •

Loading Indicator Propery Issue

On the docs provided here https://nuxtjs.org/api/configuration-loading-indicator
It states that

The property can have 3 different types: string or false or object. If a string value is provided it is converted to object style.
Default value is:

{
name: 'circle',
color: '#3B8070',
background: 'white'
}

but the object name is not provided.

Igloczek

Igloczek posted a new bug report

docs •

bug Broken Hookable reference, not replaced by Hable after releasing Nuxt v2.9.2

Version

2.9.2

Reproduction link

https://nuxtjs.org/guide/modules#run-tasks-on-specific-hooks

Steps to reproduce

The link to Hookable is broken, because this file was removed in v2.9.2 while replacing the solution with Hable

What is expected ?

Working link, with a list of available hooks.

What is actually happening?

404

Eronne

Eronne posted a new bug report

docs •

bug Broken Codesandbox link for Internationalization (i18n) page

Version

2.11.x

Reproduction link

https://nuxtjs.org/examples/i18n

Steps to reproduce

In a browser, go to Internationalization (i18n) => Sandbox not found

What is expected ?

Sandbox should be loaded on this page.

What is actually happening?

"Not Found
We could not find the sandbox you're looking for."

jordanmcdougall

jordanmcdougall posted a new bug report

docs •

bug Broken Codesandbox link for Custom Loading Component page

Version

2.11.x

Reproduction link

https://nuxtjs.org/examples/custom-loading/

Steps to reproduce

In a browser, go to Custom Loading Component is showing error:

What is expected ?

Example of Custom Loading Component should be displayed

What is actually happening?

Error message:

"Not Found
We could not find the sandbox you're looking for."

is displayed.

andrewmurraydavid

andrewmurraydavid posted a new bug report

docs •

bug Codesandbox Forbidden Access

Version

v2.3.4

Reproduction link

https://codesandbox.io/s/github/nuxt/nuxt.js/tree/dev/examples/i18n?from-embed

Steps to reproduce

  1. Access https://nuxtjs.org/examples/i18n/
  2. Try to access the codesandbox example

What is expected ?

I expect to be able to play around with the example and see the source code.

What is actually happening?

Codesandbox return a 403 Forbidden.

howieY

howieY posted a new question

docs •

使用Nuxt部署的页面执行text.split(/\r\n|\r|\n/),速度很慢

可以在官网中输入下面代码进行测试:
上传一个20MB左右的文本文件,解析速度很慢在7s以上,正常解析速度在150ms左右。

function readFile(file){
let fileReader = new FileReader();
fileReader.onload = (e) => {
let t1 = new Date().getTime();
let decodeLog = e.target.result;
decodeLog.split(/\r\n|\r|\n/);
console.log("elapse:"+(new Date().getTime()-t1))
};
fileReader.readAsText(file)
}

let inp = document.createElement("input");
inp.type="file";
inp.innerText="upload";
inp.onchange = function(event){readFile(event.target.files[0])};
inp.style.position="absolute";
inp.style.top=0;
inp.style.zIndex=10000;
document.body.append(inp);

howieY

howieY posted a new question

docs •

使用Nuxt部署的页面执行text.split(/\r\n|\r|\n/),速度很慢

可以在官网中输入下面代码进行测试:
上传一个20MB左右的文本文件,解析速度很慢在7s以上,正常解析速度在150ms左右。

function readFile(file){
let fileReader = new FileReader();
fileReader.onload = (e) => {
let t1 = new Date().getTime();
let decodeLog = e.target.result;
decodeLog.split(/\r\n|\r|\n/);
console.log("elapse:"+(new Date().getTime()-t1))
};
fileReader.readAsText(file)
}

let inp = document.createElement("input");
inp.type="file";
inp.innerText="upload";
inp.onchange = function(event){readFile(event.target.files[0])};
inp.style.position="absolute";
inp.style.top=0;
inp.style.zIndex=10000;
document.body.append(inp);

howieY

howieY posted a new question

docs •

使用Nuxt部署的页面执行text.split(/\r\n|\r|\n/),速度很慢

可以在官网中输入下面代码进行测试:
上传一个20MB左右的文本文件,解析速度很慢在7s以上,正常解析速度在150ms左右。
`
function readFile(file){
let fileReader = new FileReader();
fileReader.onload = (e) => {
let t1 = new Date().getTime();
let decodeLog = e.target.result;
decodeLog.split(/\r\n|\r|\n/);
console.log("elapse:"+(new Date().getTime()-t1))
};
fileReader.readAsText(file)
}

let inp = document.createElement("input");
inp.type="file";
inp.innerText="upload";
inp.onchange = function(event){readFile(event.target.files[0])};
inp.style.position="absolute";
inp.style.top=0;
inp.style.zIndex=10000;
document.body.append(inp);`

benmccallum

benmccallum posted a new feature request

docs •

idea Document choice of integrated server-side frameworks

What problem does this feature solve?

Currently there's no guidance on what decision to make for an integrated server-side framework on this page:
https://nuxtjs.org/guide/installation#using-code-create-nuxt-app-code-

Although I wouldn't expect there to be full coverage of each, it'd be nice if there was a quick one or two lines per framework, but more importantly some guidance on when/where it is appropriate to use the Nuxt default server and when not to.

Folks are asking on my gist whether or not they need express, and can host with just the default server on production. But I have no idea.
https://gist.github.com/benmccallum/226ae1b428157b9d5998a5ba27eadf59

I think it's a common scenario where people use Vue/Nuxt but aren't node developers, I'm certainly not one, so we need some help here to make this setup process smooth.

What does the proposed changes look like?

Quick pros/cons for each framework.
Pros/cons for nuxt default server and when/where it's appropriate/not.

ThomasR

ThomasR posted a new question

docs •

`render:routeContext` hook not working

It looks like the render:routeContext hook documented in https://nuxtjs.org/api/internals-renderer#hooks is no longer working. It should be named vue-renderer:ssr:context instead.

cf. https://github.com/nuxt/nuxt.js/commit/29297160a1f82f9d5ed882f239552892f92c705c

bukhalo

bukhalo posted a new bug report

docs •

bug The Russian version of the docs does not open through Russian ISP's

Version

*

Reproduction link

https://ru.nuxtjs.org/

Steps to reproduce

Open https://ru.nuxtjs.org/ through Russian ISP

What is expected ?

https://ru.nuxtjs.org/ will successfully open

What is actually happening?

https://ru.nuxtjs.org/ site does not open.

Additional comments?

Due to the fact that local law enforcement agencies are trying to block Telegram messenger, many subnets of large hosting providers were blocked in Russia. The current IP address of the server with Russian-language documentation is on the blocking list.

Is it possible to use another server to host Russian-language documentation? You can check the IP blocking at the following address https://eais.rkn.gov.ru/

Tomny2016

Tomny2016 posted a new question

docs •

rem and meta are used at the same time, rem does not work
<template>
  <div>
    <p>你好好</p>
    <p>Hello world</p>
  </div>
</template>
<script>
export default {
  head() {
    return {
      meta: [
        {
          hid: 'viewport',
          name: 'viewport',
          content:
            'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no'
        }
        }
      ]
    }
  }
}
</script>
<style>
html {
  font-size: calc(100vw / 3.75) !important;
  /* 将宽度是750~375的设计稿 ,分为100份 */
}

body {
  font-size: 0.14rem;
  /* 这样就是14像素 */
}
</style>
Songyu-Wang

Songyu-Wang posted a new question

docs •

https://nuxtjs.org/guide/installation `Using create-nuxt-app` predefined questions are outdated

Those are grouped wrong and in the wrong order

The Nuxt mode you want (Universal or SPA)
Add axios module to make HTTP request easily into your application.
Add EsLint to Lint your code on save.
Add Prettier to prettify your code on save.
andrewspy

andrewspy posted a new question

docs •

Document for optionally strip non-client or non-server code

Document nuxt/nuxtjs#6149

Woosy

Woosy posted a new bug report

docs •

bug [FR] Routing menu issue (named views)

Version

master

Reproduction link

https://fr.nuxtjs.org/guide/routing#named-views

Steps to reproduce

Go to https://fr.nuxtjs.org/guide/routing#named-views
Open "Routage" category in menu panel
Click on "Named Views (EN)"

What is expected ?

Clicking on "Named Views (EN)" should redirect to the corresponding ID, and set the text's color to green (active).

What is actually happening?

The title "Named Views (EN)" in the left menu panel on is not green green.
Clicking on it does nothing (should redirect).

Additional comments?

Clicking on "Transitions" sets "Named Views (EN)" to active in the menu
Clicking on "Middleware" sets "Transition" to active in the menu

raufsamestone

raufsamestone posted a new question

docs •

New translation to Turkish

Hey Folks! I like to contribute for translation to Turkish.