Comments (12)
Are you disabling eslint?
This is what my config-overrides looks like
const { override, addDecoratorsLegacy, disableEsLint, addBundleVisualizer, addWebpackAlias } = require("customize-cra");
const path = require("path");
module.exports = override(
addDecoratorsLegacy(),
disableEsLint(),
config => (process.env.BUNDLE_VISUALIZE == 1 ? addBundleVisualizer()(config) : config),
addWebpackAlias({ ["ag-grid-react$"]: path.resolve(__dirname, "src/shared/agGridWrapper.js") })
);
killing eslint is likely necessary for it to parse.
from customize-cra.
Anytime - I'll update the docs to make this more clear.
from customize-cra.
Hi @ltkn,
What version of the react-scripts are you using? If you're using the version 2.0.3, take a look at my comment here, maybe that can help.
from customize-cra.
Hi @walmor,
I saw your comment thanks, yes I'm using 2.0.3, I will give it a try today.
from customize-cra.
try my fork: https://github.com/war3k/customize-cra
from customize-cra.
Hi all! I've fixed my babel plugin method with @walmor's fix (or a version of it that works with the new api, using override
). This is released in version 0.1.0-beta4
. It's tested on react-scripts latest, and also 2.0.1, and works on both, which is good enough for me. Great fix - thanks!
@ltkn - thanks a ton for the PR, but I had to go with walmor's fix, since it's more backward compatible.
from customize-cra.
Credits to @war3k I haven't done the PR ;)
Can't get mobx working with 0.1.0-beta4
and "react-scripts": "2.0.3",
my packages :
"dependencies": {
"customize-cra": "^0.1.0-beta4",
"mobx": "^5.5.0",
"mobx-react": "^5.2.8",
"npm": "^6.4.1",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"react-helmet": "^5.2.0",
"react-scripts": "2.0.3",
"react-snap": "^1.19.0",
"semantic-ui-react": "^0.82.5",
"serializr": "^1.3.0",
"source-map-explorer": "^1.6.0",
"universal-router": "^6.0.0"
},
"scripts": {
"build-semantic": "cd src/semantic && gulp build-css build-assets",
"watch-semantic": "cd src/semantic && yarn run build-semantic && gulp watch",
"analyze": "source-map-explorer build/static/js/main.*",
"start": "yarn run build-semantic && react-scripts start",
"build": "yarn run build-semantic && react-scripts build && react-snap",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"semantic-ui": "^2.4.0",
"@babel/core": "^7.1.2",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-decorators": "^7.1.2",
"@babel/preset-env": "^7.1.0"
},
from customize-cra.
Yes it's disabled but somehow still get "Support for the experimental syntax 'decorators-legacy' isn't currently enabled". Anyone with the same versions got mobx annotations working ? thanks.
from customize-cra.
Let's see your config-overrides file
from customize-cra.
const { override, addDecoratorsLegacy, disableEsLint } = require("customize-cra");
module.exports = override(
addDecoratorsLegacy(),
disableEsLint(),
config => (process.env.BUNDLE_VISUALIZE == 1 ? addBundleVisualizer()(config) : config),
);
not sure if I need config => ( line but its there.
from customize-cra.
Just to be certain, you ARE using react-app-rewired to run your app, right? So in your package.json, you should have scripts that look something like this:
"start": "react-app-rewired start",
"build": "react-app-rewired build"
from customize-cra.
I wasn't ! I did assume this library was a replacement.
It is now working thanks a lot for your help !
from customize-cra.
Related Issues (20)
- __webpack_require__(...) is not a function
- CRA v4 switch from GenerateSW to InjectManifest not supported - workaround
- Is this project unmaintained? anybody here? HOT 1
- Example of "addWebpackExternals" has a error HOT 1
- 啥时候更新webpack5
- how can I prevent build/service-worker.js from being generated. I don't want any caching. please help, urgent
- add graphql loader
- create-react-app 强制更新到了 5.0.0 ,启用的是 webpack5,在配置 less 的时候出现错误 postcss Loader has been initialized using an options object that does not match the API schema,影响项目开展,望修复 HOT 12
- Incompatible with Create-React-App 5.0: Invalid Options for PostCSS Loader HOT 8
- PostCSS plugin autoprefixer requires PostCSS 8.
- options has an unknown property 'plugins' HOT 1
- useEslintRc ERROR!! HOT 1
- addWebpackExternals: react is not defined HOT 2
- Using customizers for jest configuration HOT 3
- addPostcssPlugins doesn't work when react-scripts's version higher than or equal to 5.0.0 HOT 5
- setWebpackPublicPath auto option HOT 1
- Workbox strategies uncaught no-response
- TypeError: addWebpackPlugin is not a function
- react项目:在configoveride.js中addPostcssPlugins添加postcss-pxtorem无效 HOT 7
- getBabelLoader().options is undefined when you fix babel-loader
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from customize-cra.