Skip to content

Commit 64a169b

Browse files
committed
chore: Next.js cannot support Less is warning
1 parent 57738c2 commit 64a169b

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

packages/nextjs/template/next.config.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ const nextConfig = {
3535
ignoreDuringBuilds: true
3636
},
3737
transpilePackages: [
38-
'taro-ui'
38+
'taro-ui'
3939
],
4040
webpack(config, options) {
4141
const {isServer, webpack} = options
4242

4343
if (!isServer && !withLess && !reported) {
4444
const chalk = require('chalk')
45-
console.log(chalk.red('\nThe current version of Next.js cannot support Less, please feed back on the issue of github.'))
45+
console.log(chalk.yellow('\nThe current version of Next.js cannot support Less, please feed back on the issue of github.\n'))
4646
reported = true
4747
}
4848

tests/__fixtures__/template/nextConfig/basic.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ const nextConfig = {
2020
eslint: {
2121
ignoreDuringBuilds: true
2222
},
23+
transpilePackages: [
24+
'taro-ui'
25+
],
2326
webpack(config, options) {
2427
const {isServer, webpack} = options
2528

2629
if (!isServer && !withLess && !reported) {
2730
const chalk = require('chalk')
28-
console.log(chalk.red('\nThe current version of Next.js cannot support Less, please feed back on the issue of github.'))
31+
console.log(chalk.yellow('\nThe current version of Next.js cannot support Less, please feed back on the issue of github.\n'))
2932
reported = true
3033
}
3134

tests/__fixtures__/template/nextConfig/default.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ const nextConfig = {
1818
eslint: {
1919
ignoreDuringBuilds: true
2020
},
21+
transpilePackages: [
22+
'taro-ui'
23+
],
2124
webpack(config, options) {
2225
const {isServer, webpack} = options
2326

2427
if (!isServer && !withLess && !reported) {
2528
const chalk = require('chalk')
26-
console.log(chalk.red('\nThe current version of Next.js cannot support Less, please feed back on the issue of github.'))
29+
console.log(chalk.yellow('\nThe current version of Next.js cannot support Less, please feed back on the issue of github.\n'))
2730
reported = true
2831
}
2932

0 commit comments

Comments
 (0)