Do you know how my configuration is working without webpack installed ? This configuration was originally made only to practice tests with Jest but the command "npm run dev" succeed to print a page. Is it a coincidence based on my code, my browser ?
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"test": "jest"
},
"dependencies": {
"axios": "^0.24.0",
"fetch": "^1.1.0",
"next": "10.1.3",
"node-fetch": "^3.1.0",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"@babel/preset-env": "^7.13.12",
"@babel/preset-typescript": "^7.13.0",
"@testing-library/dom": "^7.30.3",
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.2.6",
"@types/node": "^14.14.37",
"@types/react": "^17.0.3",
"babel-jest": "^26.6.3",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"jest-cli": "^26.6.3",
"jest-dom": "^4.0.0",
"jest-svg-transformer": "^1.0.0",
"react-test-renderer": "^17.0.2",
"ts-jest": "^27.1.2",
"ts-node": "^9.1.1",
"typescript": "^4.2.3"
}
}
Thanks for your help.
CodePudding user response:
webpack is a React dependency : https://github.com/facebook/react/blob/main/package.json
CodePudding user response:
Next.js have internal config files for such cases. I think you can check next.config.js file to see the webpack configuration.
Have a look at this link.