好的,请解释一下为什么我的调试器没有触发?从星期日和浪费时间的Google搜索到无济于事,我已经用六种方式重新配置了这些东西。看来不管我做什么,脚本都不会暂停。
(不,这是2年前的答案,没有用!请不要重定向到它,我尝试了确切的解决方法,没有任何改变)
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: ["babel-polyfill", "./client/index.js"],
output: {
path: "/",
filename: "bundle.js",
sourceMapFilename: "[name].js.map"
},
devtool: 'source-map',
resolve: {
extensions: ['.js', '.jsx', '*']
},
module: {
rules: [
{
use: {
loader: "babel-loader",
options: {
presets: ['@babel/preset-react', '@babel/env'],
plugins:['source-map-support']
},
},
test: /\.jsx?$/,
exclude: /node_modules/,
},
{
use: ["style-loader", "css-loader", "sass-loader"],
// test: /\.css$/
test: /\.s[ac]ss$/i,
},
{
test: /\.(png|jpg|gif)$/i,
use: [
{
loader: 'url-loader',
options: {
limit: 8192
}
}
]
},
]
},
plugins: [
new HtmlWebpackPlugin({
template: "client/index.html"
})
]
};
{
"name": "rpgcharsgql",
"version": "1.0.0",
"description": "The purpose of this project is to teach myself GraphQL and add another project to my portfolio.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"json:server": "json-server --watch db.json",
"dev": "nodemon --inspect index.js",
"devinspect": "nodemon --inspect index.js",
"start": "nodemon index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/preset-react": "^7.8.3",
"ajax": "0.0.4",
"apollo-cache-inmemory": "^1.6.5",
"apollo-client": "2.6.8",
"apollo-link": "^1.2.13",
"apollo-link-context": "^1.0.19",
"apollo-link-http": "^1.5.16",
"apollo-link-ws": "^1.0.19",
"apollo-server": "^2.9.16",
"apollo-utilities": "^1.3.3",
"aws-sdk": "^2.601.0",
"axios": "^0.19.1",
"babel-loader": "^8.0.0-beta.0",
"babel-plugin-lodash": "^3.3.2",
"babel-plugin-react-transform": "^3.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.7.0",
"bcrypt-nodejs": "0.0.3",
"bcryptjs": "^2.4.3",
"body-parser": "^1.18.3",
"connect-mongo": "^1.3.2",
"cors": "^2.8.5",
"crypto": "^1.0.1",
"css-loader": "3.4.2",
"dotenv": "^8.2.0",
"express": "^4.14.0",
"express-graphql": "0.9.0",
"express-jwt": "^5.3.1",
"express-session": "^1.17.0",
"file-loader": "^2.0.0",
"fs": "0.0.1-security",
"graphql": "14.5.8",
"graphql-subscriptions": "^1.1.0",
"graphql-tag": "^2.10.0",
"html-webpack-plugin": "^3.2.0",
"http": "0.0.0",
"jquery": "^3.4.1",
"jquery.scrollto": "^2.1.2",
"jsonwebtoken": "^8.4.0",
"lodash": "^4.17.4",
"lodash.flowright": "^3.5.0",
"moment": "^2.24.0",
"mongoose": "^4.13.20",
"multer": "^1.4.2",
"node-sass": "^4.13.0",
"nodemon": "^2.0.2",
"passport": "^0.3.2",
"passport-jwt": "^4.0.0",
"passport-local": "^1.0.0",
"react": "^16.12.0",
"react-apollo": "3.1.3",
"react-confirm-alert": "^2.4.1",
"react-dom": "16.12.0",
"react-router": "5.1.2",
"react-router-dom": "^5.1.2",
"react-scripts": "^3.3.0",
"react-toggle": "^4.1.1",
"sass": "^1.24.4",
"source-map-support": "^0.5.16",
"style-loader": "^0.13.1",
"subscriptions-transport-ws": "^0.9.16",
"url-loader": "3.0.0",
"validator": "^10.10.0",
"webpack": "^4.41.5",
"webpack-dev-middleware": "3.7.2"
},
"devDependencies": {
"babel-plugin-source-map-support": "^2.1.1",
"source-map-loader": "^0.2.4"
}
}