Commit Graph

51 Commits

Author SHA1 Message Date
Tobias Koppers 7bde43f47a Merge tag 'v4.40.0' into next
4.40.0
2019-09-13 11:12:26 +02:00
Tobias Koppers 758269e814 add emit/updateAsset to Compilation
add asset info with
* immutable for long term cache-able asset
* size for the asset size in bytes
* development for devtools
* hotModuleReplacement for HMR assets

show asset info in stats
2019-09-11 14:43:42 +02:00
Tobias Koppers b73d35bbee Merge tag 'v4.39.0' into next
4.39.0
2019-08-05 13:12:09 +02:00
JJ Kasper b72a308a08
Move escaping to getReplacer and update un-escaping 2019-07-23 10:42:36 -05:00
JJ Kasper d8754873f6
Apply suggestions from code review
Co-Authored-By: Tobias Koppers <tobias.koppers@googlemail.com>
2019-07-23 10:37:07 -05:00
JJ Kasper 362e5d37d6
Escape path variables in replaced values 2019-07-22 17:33:39 -05:00
Tobias Koppers 1d72a05fed Merge tag 'v4.36.0' into next
4.36.0
2019-07-17 16:02:33 +02:00
shawtung 1f22f358fa Add [file] placeholder for sourceMappingURL 2019-07-04 11:38:40 +08:00
Tobias Koppers 25d286014c fix a memory leak 2018-11-30 11:19:14 +01:00
Tobias Koppers 32db215dda minor fixes for #8109 2018-11-05 09:13:40 +01:00
Tobias Koppers cc28367a78
Merge pull request #8109 from webpack/refactor/templatedPaths
refactor(TemplatedPathPlugin): split placeholder context (`chunk|module`)
2018-11-05 09:03:00 +01:00
Florent Cailhol d881bb4c8f Add types to various plugins 2018-11-02 21:06:35 +01:00
Tobias Koppers f5c3bedf8e replace with a single regexp
for performance reasons
2018-11-01 20:23:11 +01:00
Tobias Koppers b590e4ba8e refactor placeholders a bit
add deprecation message to old placeholders
group them by context
2018-11-01 20:23:10 +01:00
Tobias Koppers b4b5223469 refactor method to use a replacements map 2018-11-01 20:23:09 +01:00
Tobias Koppers 197e98a845 filename is always a string 2018-11-01 20:23:09 +01:00
Michael Ciniawsky 56c49bdc9d refactor(TemplatedPathPlugin): split placeholder context (`chunk|module`) 2018-11-01 20:23:09 +01:00
Tobias Koppers a262b83580 remove globalPath and useChunkHash feature
It's no longer needed, because we hash the runtime how
2018-10-24 09:39:51 +02:00
Tobias Koppers 149043a134 Make create chunk and module ids filename safe 2018-09-05 21:29:22 +02:00
Tobias Koppers bad9d8a271 move Module.id into ChunkGraph
remove disconnect and unseal from Module
2018-08-28 15:08:52 +02:00
Tobias Koppers 3aa2280498 move Module.hash and .renderedHash into ChunkGraph 2018-08-22 19:24:54 +02:00
Tobias Koppers cf5f1d723c format existing code 2018-07-30 21:29:21 +02:00
Florent Cailhol 2a9452e51b Add brackets for multiline if/for statements 2018-05-29 15:45:44 +02:00
Florent Cailhol f1092ad516 Update prettier toolchain 2018-03-26 16:56:10 +02:00
Tobias Koppers d7a0fc341b fix bug without async chunks, add more tests 2018-03-24 12:08:37 +01:00
Tobias Koppers 296542ed79 add [contenthash] support 2018-03-24 12:08:36 +01:00
Tobias Koppers 5238159d21 run prettier on existing code 2018-02-25 02:00:20 +01:00
Tobias Koppers ea609374f7 split Chunk.isInitial into isOnlyInitial and canBeInitial
remove includeInitial argument of getChunk(Module)Maps
2018-01-22 12:52:28 +01:00
Tobias Koppers a2eada1d33 Merge branch 'master' into next
# Conflicts:
#	lib/BannerPlugin.js
2018-01-22 08:48:30 +01:00
nename0 dc7ebeb8d0 Fix #6243: Don't include initial chunks in chunkhash computation 2018-01-11 20:10:10 +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
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
Florent Cailhol f737b26260 Remove some plugin calls 2017-12-14 14:42:49 +01:00
Florent Cailhol 36c690d37f Use tapable instead of 'plugin' 2017-12-08 14:23:31 +01:00
Tobias Koppers 41a1d602e1 added WebAssembly Proof of Concept 2017-11-10 09:17:11 +01:00
Tobias Koppers 75f68a2635 fixes linting, remove not needed context arguments 2017-11-08 20:49:41 +01:00
Tobias Koppers f7c2f8e470 Update code style to arrow functions 2017-11-08 11:56:01 +01:00
Tobias Koppers 5e84167fbd remove deprecated stuff 2017-06-14 14:41:02 +02:00
e-cloud 59e5de59d7 refactor: remove unused code
includes unused variables, class method, class static properties and
function arguments
2017-04-11 19:39:24 +08:00
Tobias Koppers 8e69a80847 code linting 2017-01-11 12:29:01 +01:00
Will Mendes 38be237082 refactor(TemplatedPathPlugin): upgrade to ES6 (#3776) 2017-01-06 09:11:30 -06:00
Tobias Koppers ea7fd67ec1 fixed #1239 2015-07-22 22:34:25 +02:00
Tobias Koppers f7d799adb4 rebeautify without spacing after keyword 2015-07-16 00:19:23 +02:00
Avi Haiat 0a340f2b1a feat(app): Beautify all lib files 2015-07-13 01:20:09 +03:00
Avi Haiat daff7440a6 feat(app): Fix some obvious lint errors and warnings 2015-07-08 15:52:41 +03:00
Tobias Koppers 02522f11c3 throw an error when trying to use [chunkhash]
... when it's not allowed.
I. e. with HMR enabled [chunkhash] for the entry chunk
is not allowed. Now it throws an error.

Also fixes a bug where [chunkhash] doesn't have to correct
length. fixes #1192
2015-06-27 11:34:17 +02:00
Tobias Koppers 4e041dfd52 fixed [chunkhash] and [name] issue
fixed #1181
fixed #1018
2015-06-24 23:17:12 +02:00
Jason Anderson c84bd70b76 Fixes issue with hash length and loading external chunks
If the length option on a hash was being used for a file path template
(e.g. '[hash:8].js'), the file would be outputted with the correct name,
but the reference inside require.ensure would not work, because the length
truncation would operate on more than just the hash, and would truncate
some of the characters added to pad the hash value.

Fix is to implement the `hashWithLength` function where this is a problem.
This doesn't feel like a proper solution, as it adds some redundancies
in a few places, but it's only in the chunk loading blocks that this matters,
so it's small in scope.
2014-10-28 11:51:18 +01:00
Tobias Koppers 61e0212eb8 fixed global RegExp issue
#433
2014-09-24 20:54:25 +02:00
Tobias Koppers 3bc6d7b60b fixed edge case when using [chunkhash:xxx]
#427
2014-09-11 19:25:18 +02:00