marko-js / webpack

A loader for marko files and a plugin for universal bundling
MIT License
13 stars 4 forks source link

feat: webpack 5 support #42

Closed DylanPiercey closed 3 years ago

DylanPiercey commented 3 years ago

BREAKING CHANGE: Drop support for webpack 4

Description

Adds support for webpack 5

Checklist:

xtremespb commented 3 years ago

Any news on this PR?

DylanPiercey commented 3 years ago

@xtremespb this is in a prerelease of @marko/webpack@7.0.0-1. Likely to do an actual release sometime today or tomorrow.

xtremespb commented 3 years ago

Hi @DylanPiercey, do you have any news on Webpack 5 support?

DylanPiercey commented 3 years ago

@xtremespb I believe I fixed most of the issues in this PR to the point that it works with webpack 5. However it does not support the FS based cache which is something I'm most interested in seeing. Part of the change to support that needs to happen here and should not be too bad, however we also use another webpack module which does not support this (https://github.com/sysgears/webpack-virtual-modules/issues/76). We'll need to find a work around for that.

non25 commented 3 years ago

@DylanPiercey maybe you will find this approach helpful: https://github.com/sveltejs/svelte-loader/pull/151

DylanPiercey commented 3 years ago

@non25 the link is helpful. It's actually somewhat similar to what we were doing in the past.

The problem is though that @marko/webpack/plugin also uses the virtual modules for Inlining an ever-changing manifest that maps the assets from the client compiler to the server compiler. I'm not really sure what the best approach to fixing that without virtual modules is.

DylanPiercey commented 3 years ago

This has been superseded by https://github.com/marko-js/webpack/pull/48.