当我运行npm run build时,我收到错误消息
./ pages /.__ app.js 语法错误:/Volumes/Samsung_T5/mongerwebsite/pages/.__app.js:意外字符“(1:0)
1 | Mac OS X2��ATTR��9�9com.apple.quarantine0081; 5ceb38ef; Chrome; F45A7520-E981-4A9B-874E-FE0669A01E86有意将此空白留空�� | ^
发生构建错误 错误:>由于Webpack错误,构建失败 在Object.build [默认情况下](/Volumes/Samsung_T5/mongerwebsite/node_modules/next/dist/build/index.js:192:15)
这是我的next.config.js
const withSass = require('@zeit/next-sass')
const withCSS = require('@zeit/next-css');
const withFonts = require('next-fonts');
const withPlugins = require('next-compose-plugins');
const optimizedImages = require('next-optimized-images');
module.exports = withPlugins([
[optimizedImages, {
inlineImageLimit: 8192,
imagesFolder: 'images',
imagesName: '[name]-[hash].[ext]',
handleImages: ['jpeg', 'jpg', 'png', 'svg', 'webp', 'gif'],
optimizeImages: true,
optimizeImagesInDev: false,
mozjpeg: {
quality: 80,
},
optipng: {
optimizationLevel: 3,
},
pngquant: false,
gifsicle: {
interlaced: true,
optimizationLevel: 3,
},
webp: {
preset: 'default',
quality: 75,
},
}],
[withCSS], [withFonts], [withSass]
]);