Reputation: 117
I'm trying to get storybookJs
to work, when i run the command npm run storybook
i get this error:
Error: .plugins[3] may only be a two-tuple or three-tuple
This is my file .babelrc
{
"presets": ["react", "es2015-node5"],
"plugins": [
"syntax-dynamic-import",
"transform-object-rest-spread",
"transform-class-properties",
[
"module-alias",
{
"src": "./src/screens",
"expose": "screens"
},
{
"src": "./config",
"expose": "config"
},
{
"src": "./src/shared",
"expose": "shared"
},
{
"src": "./package.json",
"expose": "package"
}
]
]
}
babel packages version
Upvotes: 4
Views: 7720
Reputation: 161447
You are missing a set of []
, for examples, see the docs for the plugin.
[
"module-alias",
{
"src": "./src/screens",
"expose": "screens"
},
{
"src": "./config",
"expose": "config"
},
{
"src": "./src/shared",
"expose": "shared"
},
{
"src": "./package.json",
"expose": "package"
}
]
should be
[
"module-alias", [
{
"src": "./src/screens",
"expose": "screens"
},
{
"src": "./config",
"expose": "config"
},
{
"src": "./src/shared",
"expose": "shared"
},
{
"src": "./package.json",
"expose": "package"
}
]
]
Upvotes: 1