vercel / webpack-asset-relocator-loader

Used in ncc while emitting and relocating any asset references
https://npmjs.com/@vercel/webpack-asset-relocator-loader
MIT License
100 stars 32 forks source link

Dynamic wildcard analysis #40

Open guybedford opened 5 years ago

guybedford commented 5 years ago

With the PR in https://github.com/zeit/webpack-asset-relocator-loader/pull/39 we can now support wildcard requires like require('./local' + name), but for cases like:

const requirePath = './local' + name;
require(requirePath)

the wildcard analysis won't extend to the variable tracing.

We can add support for this by extending the variable analysis to not be known static values, but also partial values as well, although this does involve refactoring the value tracking system somewhat.

demiban commented 4 years ago

Any update on this issue?

quanru commented 11 months ago

+1