-
-
Notifications
You must be signed in to change notification settings - Fork 6
Migrate local cirodown's CSS/Js bundling to webpack to better integrate with the dynamic website #157
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
Comments
…ings normalize.css was already used in local cirodown renders, but was not getting added to the dynamic website by default due to: #157
Minimal prototype: https://github.com/cirosantilli/cirosantilli.github.io/tree/504b52f78e2b6a39498322b64c457e3137ae7ac2/web-cheat/webpack/sass-import katex fails with relative url paths, https://stackoverflow.com/questions/54042335/webpack-and-fonts-with-relative-paths we try to fix with resolve-url-loader and then it blows up with:
Asked at:
Prototype: https://github.com/cirosantilli/cirodown/tree/webpack |
As of 9116b87 the Js if fully embedded! Missing CSS due to above mentioned font woes, but raw SASS was able to embed everything for us (minus fonts which we are copying manually for now). |
Katex font issues were solved as per: https://stackoverflow.com/questions/68366936/how-to-bundle-katex-css-from-node-modules-to-a-single-output-css-from-a-sass-us/70693720#70693720 and now stuck at: https://stackoverflow.com/questions/70698775/how-to-make-webpack-generate-separate-css-and-js-with-the-same-name-index-in We could migrate to webpack if we were using a different name, e.g. The almost working branch at: https://github.com/cirosantilli/cirodown/tree/sass-webpack |
At 139b042 it is all a mess with
./build-sass
+npm run browserify
for regular renders + renders editor.html, and webpack for the dynamic website through next.js.In
web/pages/_app.tsx
we are forced to reimport all dependencies of cirodown.scss as:which duplicates the logic and leads to subtle bugs.
exports hacks are also required in
cirodown.runtime.js
to make it work for both cases.We can get rid completely of the
external_includes
approach. It will either be full embed per document, or link to a single CSS + single JS under node_modules/cirodown.The text was updated successfully, but these errors were encountered: