Skip to content
New issue

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

Document module-resolver warning #1363

Open
PierreGUI opened this issue Sep 28, 2023 · 3 comments
Open

Document module-resolver warning #1363

PierreGUI opened this issue Sep 28, 2023 · 3 comments
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing needs: complete repro 🖥️ Issue need to have complete repro provided

Comments

@PierreGUI
Copy link

Environment

  • Linaria version: 5.0.2
  • Bundler (+ version): Webpack 5 (loader 5.0.3)
  • Node.js version: 16.14.2
  • OS: Mac OSX

Description

I'm getting the warning even though I added the plugin to my config.

[linaria] path/Onboarding.tsx has a module-resolver plugin in its babelrc, but it is not present in the babelOptions for the linaria plugin. This works for now but will be an error in the future. Please add the module-resolver plugin to the babelOptions for the linaria plugin.

.babelrc

...
"plugins": [
	["module-resolver", { "alias": { "~": "./src" }}]

webpack.config.js

...
use: [
	'babel-loader',
	{
		loader: '@linaria/webpack5-loader',
		options: {
			babelOptions: {
				plugins: [
					["module-resolver", { "alias": { "~": "./src" }}],
				],
			},
		},
	},
],

What am I doing wrong?

@PierreGUI PierreGUI added bug report 🦗 Issue is probably a bug, but it needs to be checked needs: complete repro 🖥️ Issue need to have complete repro provided needs: triage 🏷 Issue needs to be checked and prioritized labels Sep 28, 2023
@github-actions github-actions bot added bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing and removed needs: triage 🏷 Issue needs to be checked and prioritized labels Sep 28, 2023
@Anber
Copy link
Collaborator

Anber commented Sep 29, 2023

It may be related to #1361. Have you checked it with @linaria/babel-preset 5.0.3?

@PierreGUI
Copy link
Author

Yes that's the version I use

@Anber
Copy link
Collaborator

Anber commented Sep 29, 2023

And that's bad news :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report 🦗 Issue is probably a bug, but it needs to be checked bundler: webpack 📦 Issue is related to webpack bundler cat: modules aliasing 🔗 Issue related to modules aliasing needs: complete repro 🖥️ Issue need to have complete repro provided
Projects
None yet
Development

No branches or pull requests

2 participants