fix: override webpack output config for cra based editors (#1108)
This commit is contained in:
BIN
.yarn/cache/react-app-rewired-npm-2.2.1-372a52d640-0b330c2b46.zip
vendored
Normal file
BIN
.yarn/cache/react-app-rewired-npm-2.2.1-372a52d640-0b330c2b46.zip
vendored
Normal file
Binary file not shown.
10
packages/components/cra-app.override.js
Normal file
10
packages/components/cra-app.override.js
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = function override(config, env) {
|
||||
config.ignoreWarnings = [/Failed to parse source map/]
|
||||
config.output = {
|
||||
...config.output,
|
||||
filename: 'static/js/[name].js',
|
||||
chunkFilename: 'static/js/[name].chunk.js',
|
||||
assetModuleFilename: 'static/media/[name].[ext]',
|
||||
}
|
||||
return config
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
const override = require('../../cra-app.override')
|
||||
module.exports = override
|
||||
@@ -14,15 +14,15 @@
|
||||
"homepage": ".",
|
||||
"scripts": {
|
||||
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
||||
"start": "react-scripts start",
|
||||
"compile": "react-scripts build",
|
||||
"start": "react-app-rewired start",
|
||||
"compile": "react-app-rewired build",
|
||||
"prepublishOnly": "npm run build",
|
||||
"clean-deploy-cache": "rm -rf node_modules/.cache/gh-pages",
|
||||
"predeploy": "yarn run pretty && yarn run build && yarn clean-deploy-cache",
|
||||
"deploy-build": "yarn run predeploy && gh-pages -b build -d build",
|
||||
"deploy-dev": "yarn run predeploy && gh-pages -b dev -d build",
|
||||
"deploy-stable": "yarn run predeploy && gh-pages -b gh-pages -d build",
|
||||
"custom:test": "react-scripts test --watchAll=false",
|
||||
"custom:test": "react-app-rewired test --watchAll=false",
|
||||
"test:coverage": "npm run test -- --coverage --watchAll",
|
||||
"eject": "react-scripts eject",
|
||||
"serve": "serve -s -p 3000 build",
|
||||
@@ -116,6 +116,7 @@
|
||||
"node-sass": "*",
|
||||
"prettier": "*",
|
||||
"react": "17.0.2",
|
||||
"react-app-rewired": "^2.2.1",
|
||||
"react-beautiful-dnd": "13.1.0",
|
||||
"react-dom": "17.0.2",
|
||||
"react-redux": "7.2.8",
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
const override = require('../../cra-app.override')
|
||||
module.exports = override
|
||||
@@ -14,8 +14,8 @@
|
||||
"homepage": ".",
|
||||
"scripts": {
|
||||
"analyze": "source-map-explorer 'build/static/js/*.js'",
|
||||
"start": "react-scripts start",
|
||||
"compile": "react-scripts build",
|
||||
"start": "react-app-rewired start",
|
||||
"compile": "react-app-rewired build",
|
||||
"eject": "react-scripts eject",
|
||||
"compile:lint": "prettier --write 'src/**/*.{html,css,scss,js,jsx,ts,tsx,json}' README.md"
|
||||
},
|
||||
@@ -56,6 +56,7 @@
|
||||
"material-icons": "^1.10.8",
|
||||
"prettier": "*",
|
||||
"react": "^17.0.2",
|
||||
"react-app-rewired": "^2.2.1",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-icons": "^4.3.1",
|
||||
"react-scripts": "^5.0.0",
|
||||
|
||||
15
yarn.lock
15
yarn.lock
@@ -5020,6 +5020,7 @@ __metadata:
|
||||
node-sass: "*"
|
||||
prettier: "*"
|
||||
react: 17.0.2
|
||||
react-app-rewired: ^2.2.1
|
||||
react-beautiful-dnd: 13.1.0
|
||||
react-dom: 17.0.2
|
||||
react-redux: 7.2.8
|
||||
@@ -5602,6 +5603,7 @@ __metadata:
|
||||
material-icons: ^1.10.8
|
||||
prettier: "*"
|
||||
react: ^17.0.2
|
||||
react-app-rewired: ^2.2.1
|
||||
react-dom: ^17.0.2
|
||||
react-icons: ^4.3.1
|
||||
react-scripts: ^5.0.0
|
||||
@@ -27044,6 +27046,19 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-app-rewired@npm:^2.2.1":
|
||||
version: 2.2.1
|
||||
resolution: "react-app-rewired@npm:2.2.1"
|
||||
dependencies:
|
||||
semver: ^5.6.0
|
||||
peerDependencies:
|
||||
react-scripts: ">=2.1.3"
|
||||
bin:
|
||||
react-app-rewired: bin/index.js
|
||||
checksum: 0b330c2b46413dc5fbb68e68c07704830397b1cfc8335f65d8f856bfbb6c4d8259fad049fc2a117c18794f321e726b844649266f42ff4c3fa044f00be48c1850
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-beautiful-dnd@npm:13.1.0, react-beautiful-dnd@npm:^13.1.0":
|
||||
version: 13.1.0
|
||||
resolution: "react-beautiful-dnd@npm:13.1.0"
|
||||
|
||||
Reference in New Issue
Block a user