我将这个Preact模板用于我的窗口小部件: https://github.com/preactjs-templates/widget
默认情况下,它将SCSS sourceMap添加到build.js:
我在preact.config.js文件中尝试了不同的方法,但是它忽略了所有方法,仍然添加了源代码。
这是我当前的preact.config.js:
export default (config, env, helpers) => {
delete config.entry.polyfills;
config.output.filename = "[name].js";
let { plugin } = helpers.getPluginsByName(config, "ExtractTextPlugin")[0];
plugin.options.disable = true;
if (env.production) {
config.output.libraryTarget = "umd";
}
};
如何从bundle.js中删除它们?