linaria
linaria copied to clipboard
Document module-resolver warning
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?
It may be related to https://github.com/callstack/linaria/pull/1361. Have you checked it with @linaria/babel-preset
5.0.3?
Yes that's the version I use
And that's bad news :)