首页 > 解决方案 > Parcel Bundler 不添加内容哈希

问题描述

我的代码是:

const Bundler = require('parcel-bundler');
const path = require('path');
const options = {
    contentHash: true,
    minify: true
};

(async function() {
    const bundler = new Bundler(path.join(__dirname, '../sass/main.scss'), options);
    await bundler.bundle();
})();

输出只是在目录中main.css,但文件名上没有散列。为什么不工作?main.js./distcontentHash: true

谢谢。

标签: node.jsexpressparceljs

解决方案


推荐阅读