umi 3.2.0 本地ssr时报了警告,请问怎么去掉?

Created on 21 May 2020  ·  7Comments  ·  Source: umijs/umi

export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
ssr: {},
routes: [
{ path: '/', component: '@/pages/index' },
],
});

image
在使用antd的组件时也会报警告,而且越来越多。
请问这么把这个去掉?

  • Umi 3.2.1
  • Node 10.14.1
  • mac
PR Welcome type(ssr)

Most helpful comment

你在 .umirc.local.ts 或 config.local.ts 中
设置
{ targets: false, autoprefixer: false }
将收获惊喜😄😄

All 7 comments

WARNING Compiled with 1 warnings 14:53:30

warning in ./src/pages/index.less?modules

Module Warning (from ./node_modules/[email protected]@postcss-loader/src/index.js):
Warning

Greetings, time traveller. We are in the golden age of prefix-less CSS, where Autoprefixer is no longer needed for your stylesheet.

@ ./src/pages/index.tsx 3:0-42 14:15-21
@ ./src/.umi/core/server.ts
@ multi ./src/.umi/core/server.ts

[SSR] render / start: 140.790ms

这个是报错内容

感觉还好,postcss-loader 的 warn,不影响

同问

是不影响运行,但是每个页面如果都引用一次的话,警告特别多,很不好

你在 .umirc.local.ts 或 config.local.ts 中
设置
{ targets: false, autoprefixer: false }
将收获惊喜😄😄

请问一下为什么有这个报错呐,我的也报错这个

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tangzhengwen picture tangzhengwen  ·  4Comments

afc163 picture afc163  ·  3Comments

mizi-lin picture mizi-lin  ·  3Comments

stoneWeb picture stoneWeb  ·  3Comments

miaojinxing picture miaojinxing  ·  3Comments