mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-13 18:24:18 -07:00
Fix various front end warnings
This commit is contained in:
parent
763572da12
commit
c3257858f6
16 changed files with 21987 additions and 13525 deletions
|
@ -5,7 +5,7 @@ path = require('path');
|
|||
//
|
||||
// In react-map-gl 7.x this is no longer needed: https://visgl.github.io/react-map-gl/docs/get-started
|
||||
//
|
||||
exports.onCreateWebpackConfig = ({stage, loaders, actions}) => {
|
||||
exports.onCreateWebpackConfig = ({stage, loaders, actions, getConfig}) => {
|
||||
actions.setWebpackConfig({
|
||||
devtool: 'eval-source-map',
|
||||
resolve: {
|
||||
|
@ -14,4 +14,18 @@ exports.onCreateWebpackConfig = ({stage, loaders, actions}) => {
|
|||
},
|
||||
},
|
||||
});
|
||||
|
||||
if (stage === 'develop') {
|
||||
const config = getConfig();
|
||||
|
||||
// Silence CSS ordering warnings, which aren't a risk with CSS Modules
|
||||
const miniCssExtractPlugin = config.plugins.find(
|
||||
(plugin) => plugin.constructor.name === 'MiniCssExtractPlugin',
|
||||
);
|
||||
if (miniCssExtractPlugin) {
|
||||
miniCssExtractPlugin.options.ignoreOrder = true;
|
||||
}
|
||||
|
||||
actions.replaceWebpackConfig(config);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue