Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (fileLoader) {
if (fileLoader.options) {
(fileLoader.options as { emitFile: boolean }).emitFile = emitFile;
} else {
fileLoader.options = { emitFile: emitFile };
}
}
if (emitFile || !webpackConfig.module) {
return;
}
// fix: avoid extract css files when value is false
// Determine hashing format.
const hashFormat = getOutputHashFormat(serverOptions.outputHashing as string);
const autoprefixer = require('autoprefixer');
const postcssImports = require('postcss-import');
const udkPostcssPluginCreator = (loader: webpack.loader.LoaderContext) => [
postcssImports({
resolve: (url: string) => (url.startsWith('~') ? url.substr(1) : url),
load: (filename: string) => {
return new Promise((resolve, reject) => {
loader.fs.readFile(filename, (err: Error, data: Buffer) => {
if (err) {
reject(err);
return;
}
if (fileLoader) {
if (fileLoader.options) {
(fileLoader.options as { emitFile: boolean }).emitFile = value;
} else {
fileLoader.options = { emitFile: value };
}
}
if (value || !webpackConfig.module) {
return;
}
// fix: avoid extract css files when value is false
// Determine hashing format.
const hashFormat = getOutputHashFormat(serverOptions.outputHashing as string);
const autoprefixer = require('autoprefixer');
const postcssImports = require('postcss-import');
const udkPostcssPluginCreator = (loader: webpack.loader.LoaderContext) => [
postcssImports({
resolve: (url: string) => (url.startsWith('~') ? url.substr(1) : url),
load: (filename: string) => {
return new Promise((resolve, reject) => {
loader.fs.readFile(filename, (err: Error, data: Buffer) => {
if (err) {
reject(err);
return;
}