Commit Graph

345 Commits

Author SHA1 Message Date
Tobias Koppers cf1d7b8949 `-!` keeps post loader instead of pre loader
add more test cases
2017-12-30 19:34:14 +01:00
Tobias Koppers 1886b7a5cb Merge branch 'master' into next
# Conflicts:
#	bin/webpack.js
#	lib/Compilation.js
#	yarn.lock
2017-12-29 11:17:10 +01:00
Tobias Koppers da5c8d87aa add tree-shaking for json modules 2017-12-22 19:49:43 +01:00
Tobias Koppers 53a1d6c7b5 replace harmonyModule flag with exportsType 3-state
exportsType falsy: It's non-harmony module
exportsType "namespace": It's a harmony module, the exports is the namespace object
exportsType "default": It's a harmony module, the exports is the default exports, named exports are properties of the default export
2017-12-22 19:42:41 +01:00
Tobias Koppers 2aac6badd5 move generated runtime code to RuntimeTemplate 2017-12-22 19:41:28 +01:00
jaketodaro fb4070442a support functions for templated string config properties
Any config property that accepts a templated string (e.g. '[name].js')
can now accept a function that returns a templated string.

```
{
    output: {
        filename: () => '[name].js'
    }
}
```

Closes #6098
2017-12-22 07:28:16 -08:00
Tobias Koppers 1172d842f7 Merge branch 'master' into next 2017-12-22 12:28:15 +01:00
Tim Kendrick b48d5d99f6 Maintain ident when chaining pitching loaders 2017-12-21 18:20:24 +00:00
Tobias Koppers 3c77f03f15
Merge pull request #6154 from EugeneHlushko/feature/use-webpack-missing-module
Feature: Use WebpackMissingModule
2017-12-21 09:35:45 +01:00
Tobias Koppers 84a3b2cd17
Merge pull request #6146 from EugeneHlushko/feature-xxhashjs
Feature: Non-crypto hashing algorithm and opt-in through config
2017-12-21 08:48:52 +01:00
Tobias Koppers 20678c6611
Merge pull request #6150 from webpack/bugfix/concat-unused-modules
fix unnecessary module concatenation
2017-12-21 08:46:36 +01:00
Florent Cailhol e58e1f9261 Use hooks in test cases 2017-12-21 07:17:27 +01:00
Tobias Koppers 878f2882ad update test cases for changed order 2017-12-20 20:41:22 +01:00
EugeneHlushko 9355b5c430 Feature: Use WebpackMissingModule: test coverage: add relative file read path 2017-12-20 12:38:36 +02:00
EugeneHlushko 26257bc0f5 Feature: Non-crypto hashing algorithm opt-in through config: use non-native hash example 2017-12-20 12:29:00 +02:00
EugeneHlushko 307566a7a1 Feature: Add an option to provide output.hashFunction as a function 2017-12-19 19:53:08 +02:00
EugeneHlushko 084c82edab Feature: Use WebpackMissingModule: test coverage 2017-12-19 19:48:26 +02:00
Tobias Koppers 4a840fba11 Avoid minimizing target test cases 2017-12-18 23:28:06 +01:00
Tobias Koppers 5cbd6b20dd allow to set sideEffects from rules 2017-12-14 13:08:57 +01:00
Tobias Koppers 2148f556a4 Enable minimizing in production mode 2017-12-14 00:06:56 +01:00
Tobias Koppers 353442d30a
Merge pull request #6112 from webpack/feature/progress-plugin
improve ProgressPlugin
2017-12-13 12:02:43 +01:00
Tobias Koppers 140cbaad21 add test for progress plugin 2017-12-13 10:08:58 +01:00
Tobias Koppers c68f224272 move providedExports into buildMeta 2017-12-12 17:01:03 +01:00
Tobias Koppers ffb977fed4 refactor meta -> buildMeta, add factoryMeta
add compat layer to Module.meta
2017-12-12 16:57:50 +01:00
Tobias Koppers 758f1eb464 Merge branch 'master' into next 2017-12-12 14:45:09 +01:00
Rowan Oulton 9c392ae397 Fix ident config position 2017-12-11 08:37:15 -08:00
Tobias Koppers 6a3fa230b7 Merge branch 'next' into chore
# Conflicts:
#	package.json
#	yarn.lock
2017-12-04 14:47:51 +01:00
Tobias Koppers bfa4b49858 Merge branch 'master' into next 2017-12-04 14:36:07 +01:00
Tobias Koppers 3803c8ad4e handle non-esm correctly in import()
return namespace object in normal import() and context import()
add namespaceObject flag to ContextModule options
change tests for updated behavior
2017-12-04 12:58:32 +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
EugeneHlushko a539f24bca SourceMapDevToolPlugin: update test config with example from change request 2017-11-25 17:11:26 +02:00
EugeneHlushko 612111ae63 SourceMapDevToolPlugin: Second test case, make sure sourcemap file is written to expected directory considering the fileContext was provided 2017-11-25 16:53:02 +02:00
EugeneHlushko 840b43f16a SourceMapDevToolPlugin: add fileContext and publicPath options. Add a configCase test 2017-11-25 16:38:30 +02:00
Tobias Koppers fd45e3b32d Merge branch 'next' into chore
# Conflicts:
#	test/configCases/plugins/uglifyjs-plugin/index.js
#	yarn.lock
2017-11-24 18:37:01 +01: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
Michael Ciniawsky 7b9eb0cff9 test(configCases/uglifyjs-plugin): update to new options interface (`options.uglifyOptions`) 2017-11-23 22:08:48 +01:00
Tobias Koppers b622c0103e add test case for module concatenation with dll plugin 2017-11-22 06:34:12 +01:00
Tobias Koppers ee31dc4d29 removed deprecated NewWatchingPlugin 2017-11-21 12:54:55 +01:00
Tobias Koppers d6ccbb9feb remove incorrect test case 2017-11-20 12:41:19 +01:00
Tobias Koppers 5e39ec46ee Allow to override resolve configuration 2017-11-18 08:12:35 +01:00
Tobias Koppers f823360910 fix testcase for windows-style paths 2017-11-17 14:16:44 +01:00
Tobias Koppers 982e44f670
Merge branch 'next' into master 2017-11-16 14:17:29 +01:00
Anuraag Agrawal ce266cb6f6 Support resourceQuery in context dependencies. 2017-11-16 15:20:50 +09:00
Tobias Koppers 4597805222
Merge branch 'next' into master 2017-11-11 19:00:05 +01:00
Tobias Koppers f58b66a724
Merge pull request #5938 from webpack/bugfix/use-function
allow to pass functions to rules.use and return arrays
2017-11-08 21:25:14 +01:00
Tobias Koppers 594f639282 allow to pass functions to rules.use and return arrays 2017-11-08 19:34:05 +01:00
Sean Larkin be315040d2 chore(deps): update all minor and patch deps, remove lint errors, update engine 2017-11-06 17:46:02 +01: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 7874aa12c6 fixup to test case 2017-10-16 15:18:41 +02:00
Tobias Koppers 814c894168 Merge branch 'master' into next
# Conflicts:
#	lib/optimize/CommonsChunkPlugin.js
#	test/statsCases/limit-chunk-count-plugin/expected.txt
#	test/statsCases/named-chunks-plugin-async/expected.txt
#	test/statsCases/optimize-chunks/expected.txt
2017-10-16 10:47:17 +02:00