You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
constfilesToWrite=awaitPromise.all(filesToBundle.map(asyncfileToBundle=>{// Initialise Bundlerconstbundler=newBundler(undefined,projectDirectory);// Bundle the Filereturnawaitbundler.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
The text was updated successfully, but these errors were encountered:
owenjs
changed the title
Bundle Multiple Files causes /*** IMPORTED FILE NOT FOUND ***/ to the outputted
'BundleAll' method causes /*** IMPORTED FILE NOT FOUND ***/ to the outputted
Nov 14, 2020
I ran into this using Builder.bundle. Stepping through the issue I found that the path resolver for includePaths doesn't work if you set up your project using scss barrels. If you have a foo/index.scss and try to @import 'foo' it will try to resolve foo.scss and not check if foo is a directory with an index.scss. You'll either need to add the full path to your imports (@import 'foo/index') or flatten your directory structure until this is resolved.
I got this problem in a project where I replaced the old, deprecated (in dart-sass) @import '~package-name/index'; referencing a barrel file with only @imports, with a more modern @import 'package-name'; .
I had to revert the changes, keeping both the tilde and the /index.
Using 3.1.2.
owenjs
changed the title
'BundleAll' method causes /*** IMPORTED FILE NOT FOUND ***/ to the outputted
'BundleAll' method causes /*** IMPORTED FILE NOT FOUND ***/ to by outputted
Apr 4, 2023
owenjs
changed the title
'BundleAll' method causes /*** IMPORTED FILE NOT FOUND ***/ to by outputted
'BundleAll' method causes /*** IMPORTED FILE NOT FOUND ***/ to be outputted
Apr 4, 2023
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.
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:
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
The text was updated successfully, but these errors were encountered: