Commit Graph

764 Commits

Author SHA1 Message Date
Tobias Koppers 758f1eb464 Merge branch 'master' into next 2017-12-12 14:45:09 +01:00
Rowan Oulton 6f85f9b386 Add ident propertry to list of permissible properties of Rule.use
As per https://webpack.js.org/configuration/module/#useentry
2017-12-07 09:47:55 -08:00
Tobias Koppers eff2f57fa5 fix merge issue (missing properties in schema) 2017-12-04 14:54:50 +01:00
Tobias Koppers bfa4b49858 Merge branch 'master' into next 2017-12-04 14:36:07 +01:00
Tobias Koppers fabe631a83 Only generate portable records when needed 2017-12-01 11:27:03 +01:00
Tobias Koppers a71284eb79 Add missing watchOptions properties to schema 2017-11-30 15:55:37 +01:00
Tobias Koppers 9b8a1322c5 Upgrade enhanced-resolve version 2017-11-29 16:34:49 +01:00
Tobias Koppers d7184b281c add new namespace option to schema 2017-11-28 10:04:57 +01:00
Tobias Koppers dae9de6595 Merge branch 'next' into feature/validate-plugin-options
# Conflicts:
#	lib/SourceMapDevToolPlugin.js
#	lib/optimize/AggressiveSplittingPlugin.js
#	yarn.lock
2017-11-28 09:59:59 +01:00
Tobias Koppers 9870165069
Merge pull request #6008 from EugeneHlushko/bugfix-issue-6003
Lookup the provided plugins on the options, throw for invalid arguments.
2017-11-27 07:48:07 +01:00
EugeneHlushko 0c9707f832 Add options.plugins schema validation: CR changes on wording 2017-11-26 13:42:18 +02:00
EugeneHlushko 70c50ea8f1 Add options.plugins schema validation, ensure apply method is present. Add tests 2017-11-24 18:54:48 +02:00
Tobias Koppers 2201b860a5 Add mode option and choose defaults depending on mode
add optimization options
use development mode for watch/hot/config tests
use production mode for integration/stats tests
create output directory if not existing
move __esModule to runtime
fix dependency behavior for cases without usedExports
2017-11-24 08:17:17 +01:00
Tobias Koppers 5840039701 add chunkCallbackName from WebWorker to schema 2017-11-21 12:57:11 +01:00
Tobias Koppers 3ded46bed4 fix typo 2017-11-20 13:04:33 +01:00
Tobias Koppers 0a535b2a4f fix required properties 2017-11-20 10:38:48 +01:00
Tobias Koppers d9d19596e5 Added documentation and fix errors 2017-11-20 10:17:34 +01:00
Sergey Petushkov 7950e3da5d Fix lint errors 2017-11-19 13:31:33 +01:00
Sergey Petushkov a07626aa71 Fix indentation 2017-11-19 11:45:15 +01:00
Sergey Petushkov ac619960ac Merge remote-tracking branch 'upstream/master' into feature/validate-plugin-options
Conflicts:
	schemas/webpackOptionsSchema.json
2017-11-18 09:35:37 +01:00
Tobias Koppers 5e39ec46ee Allow to override resolve configuration 2017-11-18 08:12:35 +01:00
Tobias Koppers a53672d1a2 Merge branch 'master' into next
# Conflicts:
#	lib/EvalSourceMapDevToolModuleTemplatePlugin.js
#	lib/dependencies/HarmonyDetectionParserPlugin.js
#	lib/dependencies/HarmonyImportDependency.js
#	package.json
#	schemas/webpackOptionsSchema.json
#	test/Validation.test.js
2017-11-17 16:03:46 +01:00
Tobias Koppers 982e44f670
Merge branch 'next' into master 2017-11-16 14:17:29 +01:00
Tobias Koppers e481ea53fd add linting for schemas
add missing descriptions in schema
2017-11-16 13:15:15 +01:00
Sergey Petushkov cdd593b847 Rename schemas; Make imports less verbose 2017-11-12 09:48:08 +01:00
Sergey Petushkov dcc09ee653 Run beautify on schemas 2017-11-12 09:48:08 +01:00
Sergey Petushkov 1065a6e46c Refactor plugins to use schema-utils; Remove unused 2017-11-12 09:48:08 +01:00
Sergey Petushkov 744dbe9b95 Add validations to plugins 2017-11-12 09:48:08 +01:00
Tobias Koppers 00f2b5ede7 advanced module type refactoring
added json type
.mjs default to javascript/esm type
adjusted parser plugins to react on module type
2017-11-11 19:27:19 +01:00
Tobias Koppers 4597805222
Merge branch 'next' into master 2017-11-11 19:00:05 +01:00
Tobias Koppers 41a1d602e1 added WebAssembly Proof of Concept 2017-11-10 09:17:11 +01:00
Tobias Koppers 122e7dc649 Merge branch 'master' into next
# Conflicts:
#	package.json
#	test/HarmonyModulesHelpers.unittest.js
#	test/StatsTestCases.test.js
#	yarn.lock
2017-10-19 21:31:35 +02:00
Stephan Badragan f925032d5a adding `output.devtoolNamespace` option
When loading multiple libraries built with webpack, you can run into
collisions of the sourcemap file paths. For examle, both have
"webpack:///src/index.js".

This change addresses the problem by introducing a new output option
`output.devtoolNamespace` which defaults to `output.library` when
not specified. The defaults moduleFilenameTemplates in all the
sourcemap plugins have been modified to start with:
"webpack://[namespace]/...", where [namespace] will be replaced by
the `output.devtoolNamespace`.

Notice that there are only two slashes following "webpack:" now.
This is to make it behave just as before when not building with a
namespace. When building with a namespace you only get the two
slashes, but from what I've seen the chrome dev tools only care
about the first 2 slashes anyways.

Discussed with sokra here:
https://github.com/webpack/webpack/issues/5767
2017-10-18 01:14:40 +01:00
Tobias Koppers 168f92330e Merge pull request #5842 from jbottigliero/bugfix/stats.all
adds stats.all option the the webpackOptionsSchema
2017-10-17 21:31:28 +02:00
Joe Bottigliero c3d77bbcf3 Update webpackOptionsSchema.json
- adds `"type": "boolean",` for `stats.all`
2017-10-17 10:47:45 -05:00
Joe Bottigliero eb00961796 adds stats.all option the the webpackOptionsSchema 2017-10-17 10:31:38 -05:00
Tobias Koppers c4bb0f410b add missing stats keys
fixes #5839
2017-10-17 16:43:29 +02:00
Tobias Koppers 82f42e2c67 Merge branch 'master' into next 2017-10-17 12:38:38 +02:00
Joe Bottigliero 576187541a [fix] webpackOptionsSchema.json
- fixes failing stats tests by adding various options to the webpackOptionsSchema.json as well as fixing invalid options provided in test configurations.
2017-10-13 21:29:35 -05:00
Joe Bottigliero e0d4501fab [fix] webpackOptionsSchema
- Updates webpackOptionsSchema "stats" object to include "additionalProperties: false"
- Adds missing stats options
- Adds test for ensuring new stats options fail the schema check (if not included)
2017-10-13 17:12:24 -05:00
Tobias Koppers 4105297de6 Merge branch 'next' into deprecation/webpack-3 2017-09-11 11:26:44 +02:00
Tobias Koppers f9bf8a9085 Limit the number of parallel processed modules
fixes #3164
fixes #3166
2017-08-11 16:11:17 +02:00
Ricky Lippmann 05f7b2d5b7 Add excludeModules and allow multiple options as fallbackchain. 2017-07-27 18:33:10 +02:00
Mike Sherov bdddee2b91 Ignore context in resolve caching when resolve or resolveLoader plugins are provided. 2017-06-28 08:37:58 -04:00
Tobias Koppers 3e3b7489b4 Merge pull request #4883 from AndersDJohnson/library-target-umd-names-per-target
feat: library target UMD supports names per target
2017-06-21 22:51:27 +02:00
Tobias Koppers 9cf6d51df6 disallow module.loaders 2017-06-14 14:42:31 +02:00
Tobias Koppers 7f8d5b2aa5 Merge branch 'master' into next 2017-06-05 11:07:44 +02:00
Tobias Koppers 7719cc6dd7 Merge pull request #4995 from jchip/master
Support turn off  NodeSourcePlugin with false option
2017-06-05 09:55:43 +02:00
Joel Chen 8fec262c8c Support turn off NodeSourcePlugin with false option 2017-06-02 23:04:23 -07:00
Suman 6c2f378fac Adding function support to noParse 2017-06-02 20:28:54 -04:00
Tobias Koppers 302289ce24 Merge branch 'master' into next 2017-06-02 16:28:22 +02:00
Tobias Koppers de8fc51a6f allow to export any property/export of the bundle
fixes #3929
2017-06-02 14:52:41 +02:00
Tobias Koppers 0f16dd95b1 fixes incorrect CLI stats output
add "detailed" preset
clean up presets to do more useful stuff

fixes #4141
fixes #4118
2017-06-01 15:03:26 +02:00
Anders D. Johnson 2ec4b5cd19
fix: update schema to support library as object 2017-05-29 13:49:34 -05:00
Tobias Koppers d8539561fd add optimization bailout info
track optimization bailout in concat plugin
2017-05-28 15:25:07 +02:00
Tobias Koppers d967a4623c add `module.strictThisContextOnImports` option
to allow spec-comforming behavior this context on
called imported harmony functions
2017-05-21 09:23:35 +02:00
restrry f2264e4202 make chunkLoadTimeout option cofigurable 2017-05-11 10:41:38 +02:00
Even Alander 958156ae42 moduleTrace added to webpackOptionsSchema.json 2017-04-29 19:43:15 +02:00
Samuel Reed 805c9fadf0
fix missing `hashSalt` from options schema 2017-04-15 11:39:49 -04:00
Tobias Koppers 7ee479579e Merge pull request #4381 from timse/add-suppressWarnings-functionality
Add suppress warnings functionality
2017-04-03 12:09:58 +02:00
Tobias Koppers 56d09ab65c Merge pull request #4533 from michael-ciniawsky/schema
fix(schema/absolutePaths): make absolute paths case insensitive
2017-03-24 22:28:10 +01:00
Tobias Koppers 10c44e5a94 fix extra newline in validation 2017-03-22 12:24:18 +01:00
Michael Ciniawsky c390700429 fix(schema/absolutePaths): make absolute paths case insensitive 2017-03-22 07:14:31 +01:00
Tim Sebastian 0dbb5958a1 add warnings filter option to options schema 2017-02-25 15:54:47 +11:00
Joe Haddad fa47a39107
Add strictExportPresence option 2017-02-22 21:06:43 -05:00
Tobias Koppers fbf84d51f2 allow to apply plugins to child compiler
allow to match on compiler name in rules

#4177
2017-02-22 11:49:49 +01:00
Mohsen Azimi 1ee598a08e Add "absolutePath": true to stats.context 2017-02-14 02:51:22 -08:00
Mohsen Azimi 43bd355adf Fix formatting 2017-02-13 18:31:50 -08:00
Mohsen Azimi 776c6c4237 Add more granular schema for stats in options schema 2017-02-13 18:29:58 -08:00
Tim Sebastian b32054d4c0 rename `non-absolut` to `relative` 2017-02-10 07:47:46 +11:00
Tim Sebastian 6a7a7d5633 use allOf instead of "extendRefs: true" option
this is recommended by @epoberezkin
2017-02-02 22:54:20 +11:00
Tim Sebastian ab1d1d0434 allow strings and array of strings for module.noPArse
also make sure they are absolute paths
2017-02-02 21:47:21 +11:00
Tim Sebastian 890db7edc3 add absolutePath to records paths 2017-02-02 21:41:29 +11:00
Tim Sebastian 56a26f3847 add `absolutePath` to module definitions
as ajv is implemented this will automatically only be applied if the properties are strings, as `absolutePath` only works with type === string
2017-02-02 21:41:09 +11:00
Tim Sebastian 6971692a34 specify more paths as required non-absolute 2017-02-02 21:18:23 +11:00
Tim Sebastian 94ab4ecd3a apply requsted changes 2017-02-02 21:12:20 +11:00
Tim Sebastian 9124a941ae remove superfluous call to getError 2017-02-02 20:16:38 +11:00
Tim Sebastian 2a6ba9cc2f apply absolutePath to webpack schema 2017-02-02 20:13:37 +11:00
Tim Sebastian 254b60337d add absolutePath keyword for ajv 2017-02-02 20:13:15 +11:00
Naoyuki Kanezawa a22b00e23d Dynamic entry support (#3634)
* enable to set a function to entry option

* add tests for entry function

* fix style

* fix identifier and readableIdentifier of MultiModule

* use arrow functions

* use arrow function

* remove incorrect new operators

* fix Validation tests
2017-01-09 01:31:49 -06:00
Eduard Kyvenko 29a1b54564 Added better validation for entry in option schema (#3567)
Added better validation for entry in option schema (#3567)

* Added better validation for entry in option schema

* Fixed option validation schema

* Improved error reporting for empty entry bundle

* Added a test for empty entry bundle
2017-01-03 23:23:57 -06:00
Sean Larkin 1c8c5b993a fix(RuleSet): allow array of functions returning either string or loader objects 2016-12-22 12:14:54 -06:00
Tobias Koppers f4ab7fc7e2 more performance improvements 2016-12-14 16:22:54 +01:00
Tobias Koppers da29d21ae4 performance improvements
breaking change: Module has now a "unbuild" method that must work correctly
2016-12-14 16:22:16 +01:00
Tobias Koppers c0b5515dbe Merge pull request #3477 from webpack/feature/validation
Improve validation errors
2016-12-14 14:30:11 +01:00
Tobias Koppers 3c1086303f Improve validation errors 2016-12-14 11:34:57 +01:00
Tobias Koppers 37b7474651 Refactoring, make options simpler
breaking change: performance options changed
2016-12-14 11:33:57 +01:00
Sean Larkin a01578ab7d chore(performance): update schema description 2016-12-07 17:22:13 +01:00
Sean Larkin 774a89b583 feat(perfbudgets): added errorOnHint flag defaulting to false for opt-in 2016-12-07 17:22:13 +01:00
Sean Larkin 000dae1889 fix(tests): Updated tests across the board to work with perf budgets 2016-12-07 17:22:13 +01:00
Sean Larkin 0f0bdff0e1 fix(syntax): fixed edge case where assets do not exist, and added schema 2016-12-07 17:21:23 +01:00
Vignesh Shanmugam d3f2927d77 normalize asset size and produce warnings for performance 2016-12-07 17:21:19 +01:00
Sean Larkin 52bfdab526 feat(perf): added initial setup for perf plugins, need to configure test cases and stats output based on perf props 2016-12-07 17:21:17 +01:00
Tobias Koppers efa3fc058b added resourceQuery condition
added function use to schema
2016-11-23 12:12:32 +01:00
Kees Kluskens 0ddf5fdb5a Allow use of booleans in the `externals` option
Fixes #3299
2016-11-19 16:47:40 +01:00
Tobias Koppers b87bfc0399 added strictModuleExceptionHandling option
fixes #1729
2016-11-16 13:09:38 +01:00
Samuel Reed 29a08f00d5
fix(schema): Remove `uniqueItems: true` from `noParse`
Fixes #3284

Note: this should technically be possible to use, but
`uniqueItems` is broken in ajv; see
https://github.com/epoberezkin/ajv/issues/342

Regardless it is better to fix this bug, and there is technically
no reason why identical noParse RegExps are wrong, just superflous.
2016-11-14 11:37:44 -06:00
Kees Kluskens 2dee91b2f7 Add extra types to scheme that previously didn't trigger an error 2016-11-04 00:22:12 +01:00
NejcZdovc 9d789598e9 Added missing properties 2016-10-09 20:18:53 +02:00
Gregory Waxman 259cf68b90 Adds empty into schema for node (#3034)
Support for empty was broken through the schema, so I've added it back.
2016-09-21 00:24:38 +02:00
Tobias Koppers 63f24e1daf added some missing schema entries 2016-09-20 19:53:56 +02:00
Tobias Koppers 8a373442c9 fixed oneOf in rules 2016-09-20 19:39:15 +02:00
Tobias Koppers 4d9d79c57e renamed enforce left/right to pre/post 2016-09-20 19:39:07 +02:00
Gajus Kuizinas 1c136db956 fix: use anyOf in place of oneOf where intended 2016-09-20 11:37:16 +01:00
Gajus Kuizinas 96fedd9124 style: indent json using rules in editorconfig; sort keys
See 8c3d97d933 (commitcomment-19093805)
2016-09-20 11:36:08 +01:00
Tobias Koppers 7d52b00bd4 updated schema for removed pre and post loaders 2016-09-20 00:54:46 +02:00
Tobias Koppers c675067bcf fixed some validation stuff 2016-09-19 21:57:12 +02:00
Tobias Koppers 8c3d97d933 add test
better error messages
validate array
more options in schema
stricter schema
fix some old configs
2016-09-19 00:54:35 +02:00
Gajus Kuizinas c83f869ed3 fix: devtool can have value false
3df89413e2/lib/WebpackOptionsDefaulter.js (L11)
2016-09-17 20:21:07 +01:00
Gajus Kuizinas be9c5efb5e feat: add JSON schema for "stats" property
Based on https://github.com/webpack/webpack/pull/2974#issuecomment-245700692 and 3df89413e2/lib/Stats.js (L765-L805).
2016-09-17 20:21:07 +01:00
Gajus Kuizinas 68460a0586 feat: add JSON schema for "name" property 2016-09-17 20:21:07 +01:00
Gajus Kuizinas 56de487c4f style: convert indentation to tabs 2016-09-17 20:21:07 +01:00
Gajus Kuizinas 291fc3b8b2 fix: add JSON schema for output.auxiliaryComment 2016-09-17 20:21:07 +01:00
Gajus Kuizinas 57ea1eabcb chore: define webpack options schema 2016-09-17 20:21:07 +01:00