d3dc / react-flying-saucer Goto Github PK
View Code? Open in Web Editor NEWA simple framework built on top of create-react-app for scalable single-page apps with functional react.
A simple framework built on top of create-react-app for scalable single-page apps with functional react.
When using dynamic import()
statements, rollup complains about the config options.
Rollup is an additional dependency, that has its own set of problems and plugins.
I didn't use Webpack initially, because I just went with what works.
To use Webpack, we have to remove the HTML plugin, and change the inputs/outputs. This doesn't seem like that much work using the craco utils?
Update: and then the bundled code needs to be built in a format that allows the most flexible use - it seems like we would want ESM bundles to let motherships use treeshaking across the fleet
Even with modules declared, It forces a workflow of:
Are arrow functions not short enough?
What do we gain by making a breaking syntax change?
Rollup's default extensions only include: '.mjs', '.js', '.json', '.node'
An error is thrown when trying to compile the examples.
Most likely won't fix due to #9
We can move to the now pretty standard baseUrl: 'src'
most people seem to recommend. Making absolute paths resolve from the source root, removing the need for @
as an alias.
It also gives a more obvious place to expose other aliases like for react-mothership.
The babel plugin enabling the _
placeholder clashes with minified code; meaning we can't just blanket add in our babel configuration and even the module forms of packages have to be bundled (bundle-react-flying-saucer
).
param.macro
is one more import away and provides a cleaner API.
There's something to be said for not having to import the macro - but this appears to be hard to do without another loader.
When using lerna bootstrap
, examples/<project>/node_modules/react-scripts
is not created and is instead in the symlinked react-flying-saucer
package.
Edit: I'm assuming this is either a yarn bug or just related to symlinks, so this probably also effects pnpm et al.
The new 2.0.0 alias plugin for rollup includes vulnerability fixes as well as completely breaking compatibility with the already defined webpack aliases.
We can map aliases to the expected array form or fix the version and force resolution of vuln fixes with package-lock or resolutions.
We can instead provide hooks or another functional abstraction to resolve named views and pass them to any component.
How does this interact with overriding the <Route />
component?
Instead of --watching
, we could expose a require()
hook that compiles on the fly...
When bundling pre-0.0.40, errors used to be passed along to the console.
Now, bundling succeeds, but does not emit any files or console output.
Now that hooks are in react-redux
and performant, there's a lot of cases where the regular library makes more sense and it would be less confusing to import from react-redux
(or rematch
).
The sconnect
functionality and useApp*
functionality could better integrate with the raw hooks already given to us instead of abstracting them - making redux binding external.
Bundling can throw an error for regenerator due to rollup config when using generators or async functions!
The UMD bundle does not run on some versions of node because of esm syntax in the injected babel helpers.
I believe the rollup script can search babel plugins and change the options?
Since I switched from using cross-spawn, exiting the process exits the process. This means there's no place for a graceful shutdown. Oops.
{
plugins: [
"import", {
"libraryName": "react-use",
"libraryDirectory": "lib",
"camel2DashComponentName": false
}
]
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.