Skip to content

Commit

Permalink
fix: allow framer-motion v5 to be used with CRA
Browse files Browse the repository at this point in the history
  • Loading branch information
karrui committed Dec 10, 2021
1 parent 22f652b commit 2cce899
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions frontend/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ module.exports = {
// Required to sync aliases between storybook and overriden configs
return {
...storybookConfig,
module: {
rules: [
...storybookConfig.module.rules,
{
type: 'javascript/auto',
test: /\.mjs$/,
include: /node_modules/,
},
],
},
resolve: {
...storybookConfig.resolve,
alias: {
Expand Down
13 changes: 13 additions & 0 deletions frontend/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ module.exports = {
return newConfig
},
},
webpack: {
configure: {
module: {
rules: [
{
type: 'javascript/auto',
test: /\.mjs$/,
include: /node_modules/,
},
],
},
},
},
plugins: [
{
plugin: CracoAlias,
Expand Down

0 comments on commit 2cce899

Please sign in to comment.