src以下のファイルを「@」で読み込みたいのですが、うまく機能しません。
どこかおかしいところがあれば教えていただきたいです
package.json
{ "name": "cuee", "version": "1.0.0", "description": "Serverless webpack example using Typescript", "main": "handler.js", "scripts": { "test": "jest" }, "jest": { "moduleFileExtensions": [ "ts", "tsx", "js" ], "moduleDirectories": [ "node_modules", "src" ], "moduleNameMapper": { "^@/(.*)$": "<rootDir>/src/$1" }, "transform": { "^.+\.(ts|tsx)$": "ts-jest" }, "globals": { "ts-jest": { "tsConfigFile": "tsconfig.json" } }, "testMatch": [ "**/__tests__/*.spec.+(ts|tsx|js)" ] }, "dependencies": { "aws-sdk": "^2.710.0", "bcrypt": "^5.0.0", "dotenv": "^8.2.0", "mysql2": "^2.2.5", "pngjs": "^5.0.0", "random-number-csprng": "^1.0.2", "serverless-nested-stack": "0.0.7", "serverless-plugin-split-stacks": "^1.9.3", "source-map-support": "^0.5.10", "typescript-json-validator": "^2.4.2", "uuid": "^8.2.0" }, "devDependencies": { "@types/aws-lambda": "^8.10.17", "@types/jest": "^26.0.15", "@types/node": "^10.12.18", "fork-ts-checker-webpack-plugin": "^3.0.1", "jest": "^26.6.3", "serverless": "^1.74.1", "serverless-offline": "^6.4.0", "serverless-webpack": "^5.2.0", "ts-jest": "^26.4.4", "ts-loader": "^5.3.3", "typescript": "^3.2.4", "webpack": "^4.29.0", "webpack-node-externals": "^1.7.2" }, "author": "The serverless webpack authors (https://github.com/elastic-coders/serverless-webpack)", "license": "MIT" }
jest.config.js
1module.exports = { 2 "roots": [ 3 "<rootDir>" 4 ], 5 "modulePaths": [ 6 "<rootDir>" 7 ], 8 "testMatch": ["<rootDir>/__test__/test_*.spec.ts"], 9 "transform": { 10 "^.+\.tsx?$": "ts-jest" 11 }, 12 "moduleFileExtensions": [ 13 "ts", 14 "tsx", 15 "js", 16 "jsx", 17 "json", 18 "node" 19 ], 20}
あなたの回答
tips
プレビュー