PromucFlow_constructor/app/client/craco.dev.config.js

51 lines
1.6 KiB
JavaScript
Raw Normal View History

const { merge } = require("webpack-merge");
const WorkboxPlugin = require("workbox-webpack-plugin");
const common = require("./craco.common.config.js");
chore: updated dependencies removed unused dependencies. (#19441) ## Description - Add resolution for json5 dependency to resolve package vulnerabilities. - Remove babel-plugin-styled-components because it was unused. - Related to `react-scripts` , if everything builds and dev server is running as expected we have no issues. Fixes #19448 Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video ## Type of change > Please delete options that are not relevant. - Non-breaking change. ## How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce. > Please also list any relevant details for your test configuration. > Delete anything that is not important - Manual - Jest - Cypress ### Test Plan - All tests need to pass. - Does not need a regression. ### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) ## Checklist: ### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag ### QA activity: - [ ] Test plan has been approved by relevant developers - [ ] Test plan has been peer reviewed by QA - [ ] Cypress test cases have been added and approved by either SDET or manual QA - [ ] Organized project review call with relevant stakeholders after Round 1/2 of QA - [ ] Added Test Plan Approved label after reveiwing all Cypress test Co-authored-by: Aishwarya UR <aishwarya@appsmith.com> Co-authored-by: Anubhav <anubhav@appsmith.com>
2023-01-06 13:42:03 +00:00
module.exports = merge(common, {
devServer: {
client: {
overlay: {
warnings: false,
errors: false,
},
},
},
optimization: {
minimize: false,
},
cache: {
type: "filesystem",
memoryCacheUnaffected: true,
},
experiments: {
cacheUnaffected: true,
},
webpack: {
plugins: [
new WorkboxPlugin.InjectManifest({
swSrc: "./src/serviceWorker.js",
mode: "development",
swDest: "./pageService.js",
exclude: [
// Dont cache source maps and PWA manifests.
// (These are the default values of the `exclude` option: https://developer.chrome.com/docs/workbox/reference/workbox-build/#type-WebpackPartial,
// so we need to specify them explicitly if were extending this array.)
/\.map$/,
/^manifest.*\.js$/,
// Dont cache the root html file
/index\.html/,
// Dont cache LICENSE.txt files emitted by CRA
// when a chunk includes some license comments
/LICENSE\.txt/,
// Dont cache static icons as there are hundreds of them, and caching them all
// one by one (as the service worker does it) keeps the network busy for a long time
// and delays the service worker installation
/\/*\.svg$/,
/\.(js|css|html|png|jpg|jpeg|gif)$/, // Exclude JS, CSS, HTML, and image files
],
}),
],
},
});