webpack-babel-multi-target-plugin icon indicating copy to clipboard operation
webpack-babel-multi-target-plugin copied to clipboard

Upcoming Webpack5 compatibility

Open aaarichter opened this issue 5 years ago • 6 comments

Hi @DanielSchaffer ,

with webpack5 at it's doorstep, I noticed that with webpack@next (v5.0.0-beta7) the following line https://github.com/DanielSchaffer/webpack-babel-multi-target-plugin/blob/c7e8dddd20a5828ec40ba78b805ad855e1b3ebd9/src/babel.target.multi.entry.plugin.ts#L4 throws:

⬢ webpack:  { Error: Cannot find module 'webpack/lib/MultiModuleFactory'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (node_modules/webpack-babel-multi-target-plugin/dist/src/babel.target.multi.entry.plugin.js:11:28)
    at Module._compile (node_modules/webpack-cli/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3) code: 'MODULE_NOT_FOUND' }

It looks like v5 changed their /lib structure

aaarichter avatar Nov 21 '19 02:11 aaarichter

@aaarichter hey, thanks for letting me know. I'll have to poke around with v5 a bit.

DanielSchaffer avatar Nov 30 '19 23:11 DanielSchaffer

@DanielSchaffer, do you have plans to up-to-date (dev)dependencies to the latest?) or it may redundant now.. (package.json) 🙂

(sorry for an improper topic)

shurygindv avatar Dec 04 '19 17:12 shurygindv

@shurygindv I've sort of been avoiding it unless there's a security vulnerability, or something I need. You know, "if it ain't broke..." Is there anything in particular you're interested in?

DanielSchaffer avatar Dec 04 '19 18:12 DanielSchaffer

@DanielSchaffer Not sure what packages @shurygindv was concerned about, but core-js 2.x is no longer developed. Can't imagine updating that would really affect much, but it would keep uf from seeing the deprecation warning every install!

moderndeveloperllc avatar Feb 11 '20 15:02 moderndeveloperllc

So as webpack@5 has been released today, is there any plan for supporting it?

Austaras avatar Oct 11 '20 07:10 Austaras

@Austaras There is a "yes, I'd (ideally) like to do that" intention, but no specific or documented plan as of yet. I'm currently finishing up a milestone on another (personal) project right now, and I can put some energy towards supporting v5 once that's wrapped up. I'm also open to community submissions, of course :)

DanielSchaffer avatar Oct 11 '20 13:10 DanielSchaffer