Skip to content

Document module-resolver warning #1363

Description

@PierreGUI

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions