Skip to content
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

webpack to vite #814

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

webpack to vite #814

wants to merge 1 commit into from

Conversation

milahu
Copy link

@milahu milahu commented Nov 25, 2022

vite.config.js Outdated Show resolved Hide resolved
@milahu
Copy link
Author

milahu commented Nov 25, 2022

runtime error

GET http://0.0.0.0:8000/metadata.json 404 (Not Found)

edit:

npm run package:discover

@milahu
Copy link
Author

milahu commented Nov 25, 2022

runtime error

GET http://0.0.0.0:8000/881c86876af63b732063d7bdd51bb226.png 404 (Not Found)

that png is part of

find node_modules/@osjs/ -name 881c86876af63b732063d7bdd51bb226.png 
node_modules/@osjs/panels/dist/881c86876af63b732063d7bdd51bb226.png
node_modules/@osjs/client/dist/881c86876af63b732063d7bdd51bb226.png

https://github.com/os-js/osjs-panels/blob/master/src/logo-blue-32x32.png

https://github.com/os-js/osjs-panels/blob/da3e669d11d98ed7fdf503d62527df1ed47470d8/src/items/menu.js#L34

seems like webpack UMD is not compatible with vite ...

/* harmony import */ var _logo_blue_32x32_png__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../logo-blue-32x32.png */ "./src/logo-blue-32x32.png");

/* harmony import */ var _logo_blue_32x32_png__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_logo_blue_32x32_png__WEBPACK_IMPORTED_MODULE_3__);

i hope this is solved when we build all packages with vite

vite will inline that png image like

const defaultIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAA...";

@andersevenrud
Copy link
Member

Hey @milahu . I've been out sick, so haven't had a chance to look at your stuff. Looks promising though. I didn't go the Vite route because upgrading Webpack will basically just "make it work" as it should again :)

I'll try to have a look this weekend.

@lemanschik
Copy link

@andersevenrud the vite thing would be maybe more great on the long run out of uptranspiling view.

While i agree it is not needed the only problem is the CSS at present and i have a complet rewrite ongoing which does not use CSS imports i assign the css directly to the elements.

i am not the biggest fan of hyperapp it self but it is better then nothing and is better then react. And it is highly compatible so i keep it.

but i will add all new components via Object.assign(el,...props) because why a framework when this wonderful buildIn exists.

@lemanschik
Copy link

lemanschik commented Apr 6, 2023

even getting this to build clean again would be great for the current state.

i got it partial build via --legacy tls flags but there are icons missing and i fixed it in the rewrite.

https://github.com/lemanschik/components-osjs-hyperapp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to Webpack 5 Webpack issues on Node 17
4 participants