fix(webpack): apply-css-loader not applying css (#8811)

* fix(webpack): apply-css-loader not applying css

* chore: bump webpack version to rc

* fix: import style scope
This commit is contained in:
Igor Randjelovic
2020-09-06 14:37:13 +02:00
committed by GitHub
parent 6a8a0d5565
commit c1a2d543b8

View File

@ -26,14 +26,14 @@ module.exports = function (content, map) {
}
content += `
const nsCore = require("@nativescript/core");
const { Application } = require("@nativescript/core");
require("@nativescript/core/ui/styling/style-scope");
if (typeof exports.forEach === "function") {
exports.forEach(cssExport => {
if (___CSS_LOADER_EXPORT___ && typeof ___CSS_LOADER_EXPORT___.forEach === "function") {
___CSS_LOADER_EXPORT___.forEach(cssExport => {
if (cssExport.length > 1 && cssExport[1]) {
// applying the second item of the export as it contains the css contents
nsCore.Application.addCss(cssExport[1]);
Application.addCss(cssExport[1]);
}
});
}