Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Add support for module.strictExportPresence and output.futureEmitAssets #207

Merged
merged 4 commits into from
Dec 15, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Module.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = class extends ChainedMap {
super(parent);
this.rules = new ChainedMap(this);
this.defaultRules = new ChainedMap(this);
this.extend(['noParse']);
this.extend(['noParse', 'strictExportPresence']);
}

defaultRule(name) {
Expand Down
1 change: 1 addition & 0 deletions src/Output.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = class extends ChainedMap {
'strictModuleExceptionHandling',
'umdNamedDefine',
'webassemblyModuleFilename',
'futureEmitAssets',
yordis marked this conversation as resolved.
Show resolved Hide resolved
]);
}
};
2 changes: 2 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ declare namespace Config {
rules: TypedChainedMap<this, Rule>;
rule(name: string): Rule;
noParse(noParse: RegExp | RegExp[] | ((contentPath: string) => boolean)): this;
strictExportPresence(value: boolean): this;
}

class Output extends ChainedMap<Config> {
Expand Down Expand Up @@ -126,6 +127,7 @@ declare namespace Config {
sourcePrefix(value: string): this;
strictModuleExceptionHandling(value: boolean): this;
umdNamedDefine(value: boolean): this;
futureEmitAssets(value: boolean): this;
}

class DevServer extends ChainedMap<Config> {
Expand Down
2 changes: 2 additions & 0 deletions types/test/webpack-chain-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ config
.end()

.output
.futureEmitAssets(true)
.auxiliaryComment('Test Comment')
.auxiliaryComment({
root: 'Root Comment'
Expand Down Expand Up @@ -248,6 +249,7 @@ config

.module
.noParse(/.min.js$/)
.strictExportPresence(true)
.rule('compile')
.test(/.js$/)
.include
Expand Down