New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(docs): update website #1022
Conversation
ludofischer
commented
Mar 18, 2021
- Remove unsupported stylesheets config
- update to new React Monaco editor API
- correct invalid React inline style property
- get rid of console warning on home page
- Remove dependency on old Styled Components release
- Remove example blog posts
6bfa162
to
e381ab1
Compare
I could not update the playground to cssnano 5 because webpack fails to bundle |
e381ab1
to
93b065f
Compare
Codecov Report
@@ Coverage Diff @@
## master #1022 +/- ##
=======================================
Coverage 97.54% 97.54%
=======================================
Files 116 116
Lines 3581 3581
Branches 1058 1058
=======================================
Hits 3493 3493
Misses 81 81
Partials 7 7 Continue to review full report at Codecov.
|
What is error? |
The error is
Notice that Docusaurus is still on webpack 4. |
Yep, we need webpack v5 here, as workaround fix it using |
I am sorry I don't think I understand what I need to do. The webpack configuration is already custommized https://github.com/cssnano/cssnano/blob/master/site/docusaurus-webpack-plugin.js async configureWebpack(config) {
config.node = {
fs: 'empty',
net: 'empty',
tls: 'empty',
};
config.externals = {
'fs/promises': ??
};
}, I don't know what to put in place of |
Because we are in browser we should return nothing, we don't have |
Still cannot make it work. I have tried
and
I don't feel like working more on the playground, since it is not a bug in cssnano, also docusaurus is probably going to have webpack 5 in the future. I also don't think that the playground should block the release, at worst we can turn it off or link to CodeSandbox. For reference, this is the branch with the playground changes: https://github.com/cssnano/cssnano/tree/playground-update |
The problem should have nothing to do with
to read some browser data in a file from disk. https://github.com/Siilwyn/css-declaration-sorter/blob/33fd613d10f4708bc00709c43dc5883ad02914e3/src/main.js#L36 So I have no idea of how that would run in a browser ( |
Why they you |
I think they use |
The problem is that even if |
Yep, they have bug https://github.com/Siilwyn/css-declaration-sorter/blob/master/package.json#L9, but no cjs verison in |
But they introduced that in |
@ludofischer it is breaking change, adding |
@sokra OK, will you open the issue with |
@ludofischer I am from mobile right now 😞 |
I checked the actual package and they do correctly ship in |
Make sense, our plan? |
I've investigated code sandbox. Unfortunately I don't think it is a solution as it expects a web page. I would promote the current RC to latest, and shut down the playground or warn that it is outdated. That way we can unblock webpack-contrib/css-minimizer-webpack-plugin#63 so then create-react-app can update when they switch to webpack 5 facebook/create-react-app#9994, as well as other consumers like angular-cli. Otherwise we will keep being bombarded by issues already fixed on master. After going through the issues, I believe the current 5 rc is likely better quality than the 4x.x releases. It fixes bugs and after opening a few pull requests againt downstreams I don't think it's likely there are big regressions. I have finalize the release notes here: #1021 |
Might want to merge #1034 before releasing to |
93b065f
to
0e94122
Compare
I think the best solution for now is to only allow the lite preset in the playground. I have experimented with embedding repl.it, but it does not feel right as you need to open the CSS file, edit it, click run, open the output file... You can;t see the input and output side-by-side. |
0e94122
to
abdd5de
Compare
Very weird, why it works with v4? |
It's because of css-delcaration-sorter. We've already discussed this (see #1022 (comment) and following comments). |
Let's disable this plugin for playground and we will try to fix it in |
I think disabling the plugin through cssnano config would not solve this. so till it gets fixed in |
If you disable the plugin in the cssnano config it would still break because the import declaration would stay, but I imagine you could use the webpack config to resolve I have tried code sandbox but I could not find a way to get rid of the browser inside the sandbox, so as in our case there is not web page to serve, it shows an error, which looks ugly. But I did not spend much time with it or repl.it, so maybe someone else can build a better demo. |
What do you think then? Are we ready to release 5.0.0? |
I think yes, if we have regressions, we will fix them in |
I have created the v5 commit #1039 Besides that we need to publish the release notes #1021 update the website (I think only @anikethsaha can update the website because of their token is in the release script) |
You can change it to your username as well. it should work. It is for github pages and a workaround to make it work with docusaurus. |
abdd5de
to
d2e1589
Compare
Codecov Report
@@ Coverage Diff @@
## master #1022 +/- ##
=======================================
Coverage 96.34% 96.34%
=======================================
Files 116 116
Lines 3583 3583
Branches 1058 1058
=======================================
Hits 3452 3452
Misses 122 122
Partials 9 9 Continue to review full report at Codecov.
|
d2e1589
to
fa7f6e6
Compare
Hey, I actually managed to deploy the website base on this branch: https://cssnano.co/ There were a lot of broken links that I have fixed too. Maybe take a look at the website if everything is fine. Then I suggest we merge this pull request to master. And revisit the playground bundling issue after Docusaurus updates to webpack 5. |
FYI the |
c991380
to
b7babf8
Compare
* fix broken links * repair automated site changelog generation * replace build:site with build:docs so you can preview the doc changes without running a full site build every time * fix wrong information in README * update dev dependencies I have left the links to some external websites that I could not access, since I do not know whether they're gone for good or just experiencing some issues. Fix #1056 Fix #672
* run cssnano 5 in the playground Can only use the lite config as postcss-declaration-sorter does not work in the browser * Remove unsupported stylesheets config * update to new React Monaco editor API * correct invalid React inline style property * get rid of console warning on home page * Remove dependency on old Styled Components release * Remove example blog posts
b7babf8
to
8833542
Compare
I've finally managed to migrate the website to webpack 5 and repair the automated changelog generation. The goof news is that now we can build the playground with |
I've deployed this update, so you can check for example:
|
Looks good ⭐ |