-
Notifications
You must be signed in to change notification settings - Fork 25
Description
I have a use case for the 'BundleAll' method, so I'm using the same technique as suggested in #67.
However, the bundled files have the comment below appear multiple times.
/*** IMPORTED FILE NOT FOUND ***/
/*** --- ***/
It looks like the @imports which are causing this comment are the ones included in all of the files being bundled.
Although one bundled file manages to output the bundled content for the import and the others do not.
For example, I'm importing _variables.scss in all the files.
To fix this I'm instead initialising the Bundler class each time I iterate over my filesToBundle array:
const filesToWrite = await Promise.all(filesToBundle.map(async fileToBundle => {
// Initialise Bundler
const bundler = new Bundler(undefined, projectDirectory);
// Bundle the File
return await bundler.bundle(fileToBundle);
}));This way the files bundle as expected.
I thought I'll mention it as I'm not sure if this is intended, if so #67 is the wrong replacement for 'BundleAll' for my use case.
Package version: v3.1.2
Node version: v14.10.0
OS: Windows