We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack: 4.26.1
/* eslint-disable */ var path = require("path"); var webpack = require("webpack"); var HtmlWebpackPlugin = require("html-webpack-plugin"); var ErrorOverlayPlugin = require("error-overlay-webpack-plugin"); var FriendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin"); var autoprefixer = require("autoprefixer"); var config = require("./config"); module.exports = { mode: "development", devtool: "cheap-module-source-map", entry: [ "webpack-dev-server/client?/", "webpack/hot/dev-server", // require.resolve('react-dev-utils/webpackHotDevClient'), // require.resolve('react-error-overlay'), "./src/index.js", ], output: { publicPath: "/", path: __dirname + "/static/js/", filename: "main.js", }, module: { rules: [ { test: /\.(html)$/, use: { loader: "html-loader", }, }, { test: /\.(js|jsx)$/, exclude: /node_modules/, use: [ "babel-loader", { loader: "eslint-loader", options: { emitWarning: true, }, }, ], }, { test: /\.(css|scss)$/, use: [ "style-loader", { loader: "css-loader", options: { modules: true, sourceMap: true, localIdentName: "[local]__[hash:8]", }, }, { loader: "postcss-loader", options: { plugins: [ autoprefixer({ browsers: ["ie >= 8", "last 4 version"], }), ], sourceMap: true, }, }, { loader: "sass-loader", options: { sourceMap: true, }, }, ], }, { test: /\.(png|jpg|gif)$/, use: [ { loader: "file-loader", options: { name: "[name].[ext]", outputPath: "static/media/", }, }, ], }, ], }, plugins: [ new ErrorOverlayPlugin(), new FriendlyErrorsWebpackPlugin({ compilationSuccessInfo: { messages: ["You application is running here http://localhost:" + config.port], notes: ["^_^ ./"], }, clearConsole: true, }), new webpack.HotModuleReplacementPlugin(), new HtmlWebpackPlugin({ template: "public/index.html", }), ], };
The text was updated successfully, but these errors were encountered:
I found a mistake I have: fileName: webpack:///src/components/SomeComponent.js, right: fileName: ./src/components/SomeComponent.js
fileName: webpack:///src/components/SomeComponent.js
fileName: ./src/components/SomeComponent.js
Why i get the wrong address? Probably I have somewhere incorrectly configured config.
Sorry, something went wrong.
I fix this problem.
Need to add this line code for replace original disk location.
output: { ... devtoolModuleFilenameTemplate: info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/') ... }
Great, thanks for the trick!
No branches or pull requests
webpack: 4.26.1
The text was updated successfully, but these errors were encountered: