Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Misc small Admin UI new interfaces changes (#3939)
* Misc small Admin UI new interfaces changes * Fix linting and arrow on popover * Fix a thing
- Loading branch information
Showing
11 changed files
with
176 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
const withPreconstruct = require('@preconstruct/next'); | ||
module.exports = { | ||
webpack(config, { isServer, defaultLoaders }) { | ||
let hasFoundRule = false; | ||
defaultLoaders.babel.options.rootMode = 'upward-optional'; | ||
config.module.rules.forEach(rule => { | ||
if ( | ||
rule.use === defaultLoaders.babel || | ||
(Array.isArray(rule.use) && rule.use.includes(defaultLoaders.babel)) | ||
) { | ||
hasFoundRule = true; | ||
delete rule.include; | ||
} | ||
}); | ||
if (!hasFoundRule) { | ||
throw new Error('The Next Babel loader could not be found'); | ||
} | ||
if (isServer) { | ||
config.externals = ['react', 'react-dom', 'next/router']; | ||
config.resolve.mainFields = ['browser', 'module', 'main']; | ||
} else { | ||
config.resolve.mainFields = ['module', 'main']; | ||
} | ||
|
||
module.exports = withPreconstruct(); | ||
return config; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.