我有一个 nextjs 网站。
我的 common.js 和我的 custom.scss 不会被 next 缩小。
我在 next.config.js 中尝试了下一个:
const withSass = require('@zeit/next-sass')
const withOptimizedImages = require('next-optimized-images');
const withTypescript = require('@zeit/next-typescript')
module.exports = withSass({minified:true},withOptimizedImages(withTypescript()))
Run Code Online (Sandbox Code Playgroud)
我的 .babelrc
{
"presets": [
"next/babel",
"@zeit/next-typescript/babel",
"minify"
]
}
Run Code Online (Sandbox Code Playgroud)
我的 tsconfig.json
{
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"jsx": "preserve",
"lib": [
"dom",
"es2017"
],
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"preserveConstEnums": true,
"removeComments": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "esnext"
}
}
Run Code Online (Sandbox Code Playgroud)
它应该工作还是我必须实施更多的东西?