Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
17
node_modules/webpack/lib/asset/AssetModulesPlugin.js
generated
vendored
17
node_modules/webpack/lib/asset/AssetModulesPlugin.js
generated
vendored
@@ -86,7 +86,19 @@ const getNormalModule = memoize(() => require("../NormalModule"));
|
||||
const type = ASSET_MODULE_TYPE;
|
||||
const PLUGIN_NAME = "AssetModulesPlugin";
|
||||
|
||||
/**
|
||||
* @typedef {object} AssetModulesPluginOptions
|
||||
* @property {boolean=} sideEffectFree
|
||||
*/
|
||||
|
||||
class AssetModulesPlugin {
|
||||
/**
|
||||
* @param {AssetModulesPluginOptions} options options
|
||||
*/
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply the plugin
|
||||
* @param {Compiler} compiler the compiler instance
|
||||
@@ -112,7 +124,10 @@ class AssetModulesPlugin {
|
||||
/** @type {NormalModuleCreateData} */
|
||||
(createData)
|
||||
);
|
||||
module.factoryMeta = { sideEffectFree: true };
|
||||
if (this.options.sideEffectFree) {
|
||||
module.factoryMeta = { sideEffectFree: true };
|
||||
}
|
||||
|
||||
return module;
|
||||
});
|
||||
}
|
||||
|
||||
6
node_modules/webpack/lib/asset/RawDataUrlModule.js
generated
vendored
6
node_modules/webpack/lib/asset/RawDataUrlModule.js
generated
vendored
@@ -42,9 +42,13 @@ class RawDataUrlModule extends Module {
|
||||
*/
|
||||
constructor(url, identifier, readableIdentifier) {
|
||||
super(ASSET_MODULE_TYPE_RAW_DATA_URL, null);
|
||||
/** @type {string} */
|
||||
this.url = url;
|
||||
/** @type {Buffer | undefined} */
|
||||
this.urlBuffer = url ? Buffer.from(url) : undefined;
|
||||
this.identifierStr = identifier || this.url;
|
||||
/** @type {string} */
|
||||
this.identifierStr = identifier;
|
||||
/** @type {string} */
|
||||
this.readableIdentifierStr = readableIdentifier || this.identifierStr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user