我已从 Webpack 3 升级到 Webpack 4。\n从那时起,我收到了很多有关未从某些文件导出的导入的警告。
\n\n./packages/utils/logging/index.ts\nAttempted import error: \xe2\x80\x98Options\' is not exported from \'./loggers/log\'.\n @ ./packages/utils/index.ts\n @ ./src/App.tsx\n @ multi whatwg-fetch @babel/polyfill ./src/App.tsx\nRun Code Online (Sandbox Code Playgroud)\n\n我ts-loader与一起使用ForkTsCheckerWebpackPlugin使用。\n我已经检查了警告的导出,它们看起来不错。该代码确实有效,但是我仍然收到这些警告。
tsconfig.json以供参考:
{\n "compilerOptions": {\n "outDir": "build/dist",\n "module": "esnext",\n "target": "es5",\n "lib": ["es6", "dom"],\n "baseUrl": ".",\n "sourceMap": true,\n "allowJs": true,\n "jsx": "react",\n "moduleResolution": "node",\n "forceConsistentCasingInFileNames": true,\n "noImplicitReturns": true,\n "noImplicitThis": true,\n "strictNullChecks": true,\n "suppressImplicitAnyIndexErrors": true,\n "noUnusedLocals": false,\n "noUnusedParameters": false,\n "allowSyntheticDefaultImports": true,\n "skipLibCheck": true,\n "resolveJsonModule": true\n },\n "include": ["packages/**/*"],\n …Run Code Online (Sandbox Code Playgroud)