Description
Hey there, I'm considering dropping my existing build system in favor of create-react-app
, but there are a few features that I would need. At some point, I'll likely need to fork, but until then, I'm curious if any of these features appeal to you enough to open up a PR.
- absolute imports
In a large codebase, relative paths can get really annoying and make it hard to determine where files are being used. I'd like to suggest aliasing the project name to the root of the project. That way you can write something like import Env from 'create-react-app/config/env'
. And if you want to find out where this file is used, its a simple find-all query for the file path.
- babel-polyfill
looks like this project isnt using the babel-polyfill. any reason you opted to use a variety of other polyfills instead?
- stage-0 preset
similarly, is the any reason this project is using a bunch of babel plugins rather than just using the stage-0 preset?
- postcss variables / imports
What is the preferred method of sharing CSS variables amongst files? My current solution is to @import
a variables.css
file that doesnt generate any css so long as autoprefixer is prefixing for a browser that doesnt support css variables. I'm not sure this is the best solution since eventually this will result in duplicate css once browsers support css variables. But I dont want to rely on magic globals either.
- stylelint
any interest in adding stylelint as a postcss plugin?
- configurable environments / feature flags
I'd like to be able to run the application from the cli specifying the NODE_ENV and/or feature flags that use the define plugin. Something like NODE_ENV="replay" npm start
which would let me start up the app in development mode with my replay devtool so I can run through various pre-recorded redux scenes.
- deploy elsewhere
We're deploying our stuff to S3. Given this is a "zero-config" build tool, I'm not sure how adding an s3 deploy script would work.
- how to build component library package?
Suppose I have a bunch of shared React components. How would I build this package so that I can publish it on NPM and require it from another project? The fact that babel isnt parsing node_modules
means that we need to build a distribution file. But we also shouldnt be minifying or hashing the filenames, and we also dont need an index.html file. Any ideas how we could outfit this tool to work for React component libraries?
- zero-configuration (configurable) build tool
this all leads me to thinking that maybe the right way to go is to have a configurable build tool with some zero-configuration defaults. how to I set the eslint config, flowtype config, stylelint config, babel config? I dont want to rely on a .babelrc
or something that I have to copy into all of my projects. Ideally, I could create a package called chets-build-system
which depends on create-react-app-core
and configures it with my custom configs. the create-react-app
package can simply have a set of sane defaults but doesnt necessarily have all the feature I want...