bootstarted / css-split-webpack-plugin

Split your CSS for stupid browsers using webpack and postcss.
78 stars 22 forks source link

imports path incorrect when publicPath is relative #5

Open kfeinUI opened 8 years ago

kfeinUI commented 8 years ago
  1. imports: true
  2. publicPath: 'dist/'

The split file containing the imports is put in the right place under dist along with the pieces. However, the @import points to "dist/styles-1.css". Since these are relative to the current split file, it's looking under "dist/dist/styles-1.css".

Not a big deal on my end. I simply made my publicPath context-relative. Just thought I'd submit the issue in case others run into it.

izaakschroeder commented 8 years ago

Thanks for the report! I will see what I can do about this. 😄

Costa-iStone commented 7 years ago

Have the same problem as @kfeinUI. The issue can be resolved by adjusting the return on import. line 157 in index.js
return @import '${file._name}';; This points the @import in the correct direction for the split file.