Code Monkey home page Code Monkey logo

Comments (5)

nethusan avatar nethusan commented on August 24, 2024 1

@LukasTy, thank you for the information. However, we have been using the syntax (variable.?) throughout the project for quite some time, so I suspect the issue stems from something else. The example I provided earlier is just one of many errors originating from the @mui package. I attempted to resolve these by upgrading to webpack 5 and rebuilding the project, which initially seemed to eliminate the errors. Unfortunately, this upgrade led to new issues related to webpack 5 because of other plugins. So we can close this since this is working with webpack 5

from mui-x.

LukasTy avatar LukasTy commented on August 24, 2024

@nethusan, could you check #12612 and the suggested workarounds if you are unable to update to webpack 5?
This issue looks a duplicate of that one, if you agree, feel free to close it. ๐Ÿ˜‰

from mui-x.

nethusan avatar nethusan commented on August 24, 2024

@LukasTy I tried that but does not resolve anything, same issue,

this my test from webpack.config

rules: [
	{
		test: /\.[jt]sx?$/,
		exclude: [
			{
				test: path.resolve(__dirname, 'node_modules'),
				exclude: [
					path.resolve(__dirname, 'node_modules/@mui/x-data-grid'),
					path.resolve(__dirname, 'node_modules/@mui/x-license'),
				],
			},
		],
	},
	{
		test: /\.js$|jsx/,
		include: path.resolve(__dirname, '../src'),
		loader: 'babel-loader',
		exclude: [
			{
				test: path.resolve(__dirname, 'node_modules'),
				exclude: [
					path.resolve(__dirname, 'node_modules/@mui/x-data-grid'),
					path.resolve(__dirname, 'node_modules/@mui/x-license'),
				],
			},
		],
		options: {
			cacheDirectory: true,
			cacheCompression: false,
			sourceMaps: true,
			plugins: [
				require.resolve('react-refresh/babel'),
			].filter(Boolean),
		},
	},
	{
		test: /\.(scss|css)$/,
		use: [
			'style-loader',
			'css-loader',
			{
				loader: "sass-loader",
				options: {
					implementation: require("sass"),
				},
			},
		],
		exclude: /node_modules/,
	},
	{
		test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
		loader: 'url-loader',
		options: {
			limit: 10000,
		},
	},
],

Maybe I need to mention that I can see lot more error but similar error message.

image

from mui-x.

LukasTy avatar LukasTy commented on August 24, 2024

@nethusan I don't see you using the @babel/preset-env, which would include the necessary transforms (i.e. the optional chaining).
Please check this live example for more details.
If it doesn't help, please provide a complete minimal reproduction example.

In any case, I'd strongly advise firstly updating your development setup, then going for the @mui package bumping.
If you add these workarounds, then it's just additional technical debt that can be avoided by switching priorities. ๐Ÿ˜‰

No offense, but isn't it a bit strange having a development setup that doesn't work with features, that have already been live in all major browsers for 4+ years? ๐Ÿ™ˆ

from mui-x.

github-actions avatar github-actions commented on August 24, 2024

โš ๏ธ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@nethusan: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

from mui-x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.