@sanpjs/bundler-webpack
Version:
@sanpjs/bundler-webpack
16 lines • 638 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
exports.default = ({ config, resolver }) => {
const { publicPath } = config.build;
const filename = (0, utils_1.getAssetPath)(config.build.assetDir, `css/[name]${config.build.hash ? '.[contenthash:8]' : ''}.css`);
const options = {
publicPath: publicPath
|| '../'.repeat(filename.replace(/^\.[\/\\]/, '').split(/[\/\\]/g).length - 1)
};
return {
loader: resolver.resolve('mini-css-extract-plugin/dist/loader'),
options
};
};
//# sourceMappingURL=extract-css.js.map