does not go to the editor when clicked
See original GitHub issueit shows errors but if you click in the browser it doesn’t go to the code editor
const path = require("path");
const webpack = require("webpack");
const HTMLwebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCssAssetPlugin = require("optimize-css-assets-webpack-plugin");
const TerserWebpackPlugin = require("terser-webpack-plugin");
const ErrorOverlayPlugin = require("error-overlay-webpack-plugin");
const isDev = process.env.NODE_ENV === "development";
const isProd = !isDev;
const cssLoader = (extra) => {
const loaders = [
{
loader: MiniCssExtractPlugin.loader,
options: {
hmr: isDev,
reloadAll: true,
publicPath: "../",
},
},
{
loader: "css-loader",
options: {
url: true,
},
},
];
if (extra) {
loaders.push(extra);
}
return loaders;
};
module.exports = {
context: path.resolve(__dirname, "src"),
mode: "development",
entry: {
index: "./index.js",
},
output: {
filename: isDev ? `js/[name].js` : `js/[name].[contenthash:8].chunk.js`,
path: path.resolve(__dirname, "build"),
},
devServer: {
port: 4200,
hot: isDev,
},
optimization: {
moduleIds: "hashed",
splitChunks: {
chunks: "all",
name: false,
},
minimizer: [].concat(
isProd
? [
new OptimizeCssAssetPlugin(),
new TerserWebpackPlugin(),
]
: []
),
},
resolve: {
extensions: [".js", ".json"],
},
plugins: [
new HTMLwebpackPlugin({
template: "./index.html",
minify: {
collapseWhitespace: isProd,
},
}),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new CleanWebpackPlugin(),
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, "src/favicon.ico"),
to: path.resolve(__dirname, "build"),
},
]),
new MiniCssExtractPlugin({
filename: isDev ? `[name].css` : "css/[name].[hash:8].css",
}),
new ErrorOverlayPlugin(),
],
devtool: isDev ? "cheap-module-source-map" : "",
module: {
rules: [
{
test: /\.css$/,
use: cssLoader(),
},
{
test: /\.(png|jpg|svg|gif)$/,
loader: "file-loader",
options: {
outputPath: "img",
},
},
{
test: /\.(ttf|woff|woff2|eot)$/,
use: ["file-loader"],
},
{
test: /\.s[ac]ss$/,
use: cssLoader("sass-loader"),
},
{
test: /\.ts$/,
exclude: /node_modules/,
loader: "babel-loader",
options: {
presets: ["@babel/preset-env", "@babel/preset-typescript"],
plugins: ["@babel/plugin-proposal-class-properties"],
},
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
options: {
presets: ["@babel/preset-env", "@babel/preset-react"],
plugins: ["@babel/plugin-proposal-class-properties"],
},
},
"eslint-loader",
],
},
],
},
};
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
CKEditor's click event not firing - Stack Overflow
For some reason, the click event never fires. However, if I listen to the doubleclick event, it fires when the editor is double...
Read more >Ctrl + Click is not working VS Code Editor(Javascript file)
Steps to Reproduce: create a Javascript function; invoke that function; Do a Ctrl + click -> earlier it used to go to that...
Read more >The Photo Editor button appears in the task bar, but the ...
... in the task bar, but the Microsoft Photo Editor window does not appear ... You click Restore Down (the middle button in...
Read more >WordPress Visual Editor Not Working? Here's How to Fix It
Go to File Manager. · A list of folders will be displayed. Open the public_html folder and scroll down to the wp-config.php file....
Read more >Code Navigation in Visual Studio Code
The command editor.action.goToTypeDefinition is not bound to a keyboard shortcut by default but you can add your own custom keybinding. Go to Implementation....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
so i actually just brought in all of react-dev-utils because its 2020 and the singularity is gonna happen soon anyway so why worry about performance or bundle size etc…
anyway, i have found what is working for me is based on a few things.
react-dev-utils
and using the suggestion of basically just replacing some strings instead of using the ones provided by abramov (gaeron) in the previous issue b. replacereact-error-overlay
withreact-dev-utils/webpackHotDevClient
c. replacereact-error-overlay/middleware
withreact-dev-utils/errorOverlayMiddleware
'webpack://[namespace]/[resource-path]?[loaders]'
so i guess what i’m trying to say is… that one config option is worth investigating as the potential solution somewhere for those who find this issue.
@vjpr maybe we could find a way to make it work by default?