Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Commit 6cde064

Browse files
committed
Convert back slashes to forward slashes in import statement.
Usually an import of css is replaced with the css content, however sometimes it results in an @import statement. Could not produce an example that generates an @import statement. In a current project of mine this happens to some css files imported from a jspm package. Not sure what triggers it (size/other references/location). Therefor, no unit test was added
1 parent 4d4ed72 commit 6cde064

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

css-plugin-base-builder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ exports.bundle = function(loads, compileOpts, outputOpts) {
143143
}));
144144

145145
return postcss(postCssPlugins)
146-
.process(Object.keys(inputFiles).map(name => '@import "' + name + '";').join('\n'), {
146+
.process(Object.keys(inputFiles).map(name => '@import "' + name.replace(/\\/g, '/') + '";').join('\n'), {
147147
from: path.join(baseURLPath, '__.css'),
148148
to: cwd + path.sep + '__.css',
149149
map: {

0 commit comments

Comments
 (0)