mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 02:54:11 +08:00
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:
@ -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]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user