-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack versions available: 4.0.0 #3083
Comments
I'm getting the following when trying to run Storybook in a project using Webpack 4;
Is this going to be resolved soon? |
Yes, but it will be a breaking change |
I'd say it should be out in a week, but @shilman may correct me |
What do you mean by strong? |
I'm also getting the same error as @TomFoyster . Any idea on when this will be resolved? It's bizarre because my co workers haven't had this issue, they're both on win and mac. I'm on Windows as well. |
Released as |
There are new versions of webpack available from npm.
4.0.0
Big changes
mode
or--mode
) between two modes now: production or developmentoptimization.*
(build your custom mode)process.env.NODE_ENV
are set to production or development (only in built code, not in config)none
mode which disables everythingimport()
always returns a namespace object. CommonJS modules are wrapped into the default exportimport()
NoEmitOnErrorsPlugin
->optimization.noEmitOnErrors
(on by default in production mode)ModuleConcatenationPlugin
->optimization.concatenateModules
(on by default in production mode)NamedModulesPlugin
->optimization.namedModules
(on by default in develoment mode)CommonsChunkPlugin
was removed ->optimization.splitChunks
,optimization.runtimeChunk
type: "javascript/auto"
when transforming JSON via loader to JSBig features
javascript/esm
handles ESM more strictly compared tojavascript/auto
:default
import, everything else (including namespace import) emit errors.mjs
modules arejavascript/esm
by defaultimport()
sideEffects: false
is now supported in package.jsonsideEffects
in package.json also supports glob expressions and arrays of glob expressionsoptimization.splitChunks
option was introducedDetails: https://gist.github.com/sokra/1522d586b8e5c0f5072d7565c2bee693
import()
occur in a dead branchwebpackInclude
andwebpackExclude
are supported by the magic comment forimport()
. They allow to filter files when using a dynamic expression.System.import()
now emits a warningRule.parser.system: true
System.import
withRule.parser.system: false
module.rules[].resolve
. It's merged with the global configuration.optimization.minimize
has been added to switch minimizing on/offoptimization.minimizer
has been added to configurate minimizers and optionswebpack-cli
to use the CLI--progress
) now displays plugin namesFeatures
module.rules[].type
options.dependencies
configurations now throw errorsideEffects
can be overriden via module.rulesoutput.hashFunction
can now be a Constructor to a custom hash functionoutput.globalObject
config option to allow to choose the global object reference in runtime exitCodetype
andrequest
.include
test
andexclude
to the eval source map devtool pluginfor of
instead offorEach
Map
andSet
instead of Objectsincludes
instead ofindexOf
text/javascript
andasync
as this are the default values (saves a few bytes)__webpack_require__
and argument is omitted.wasm
,.mjs
,.js
and.json
extensions in this orderoutput.pathinfo
is now on by default in develoment modeentry
defaults to./src
output.path
defaults to./dist
production
defaults when omiting themode
option<{parents}>
>{children}<
and={siblings}=
in StatsbuildAt
time to statsimport()
now emits a error instead of a warningdone
is now an async hookBugfixes
*/
output.chunkCallbackName
to the schema to allow configurating WebWorker templatemodule.id/loaded
now correctly bails out of Module Concatentation (Scope Hoisting)Watching.invalidate
-!
behavior with post loadersrun
andwatchRun
hooks forMultiCompiler
this
is now undefined in ESMvar
,const
orlet
javascript/dynamic
orjavascript/module
is used.buildMeta
of nulloriginal-fs
module for electron targetsplugins
Internal changes
plugin
calls withtap
calls (new plugin system)buildMeta.exportsType: "default"
for json modulesneo-async
instead ofasync
Removed features
module.loaders
loaderContext.options
Compilation.notCacheable
flagNoErrorsPlugin
Dependency.isEqualResource
NewWatchingPlugin
CommonsChunkPlugin
Breaking changes for plugins/loaders
plugin
method is backward-compatibleCompiler.hooks.xxx.tap(<plugin name>, fn)
nowChunk.chunks/parents/blocks
are no longer Arrays. A Set is used internally and there are methods to access it.Parser.scope.renames
andParser.scope.definitions
are no longer Objects/Arrays, but Map/Sets.StackedSetMap
(LevelDB-like datastructure) instead of ArraysCompiler.options
is no longer set while applying pluginsDependency.getReference()
may now return aweak
property.Dependency.weak
is now used by theDependency
base class and returned in the base impl ofgetReference()
Module
sContextModule
andresolveDependencies
Compiler.resolvers
intoCompiler.resolverFactory
accessible with pluginsDependency.isEqualResource
has been replaced withDependency.getResourceIdentifier
Template
are now staticoutputOptions
andrequestShortener
has been moved to this classModule.meta
has been replaced withModule.buildMeta
Module.buildInfo
andModule.factoryMeta
have been addedModule
have been moved into the new objectsloaderContext.rootContext
which points to thecontext
options. Loaders may use it to make stuff relative to the application root.this.hot
flag to loader context when HMR is enabledbuildMeta.harmony
has been replaced withbuildMeta.exportsType: "namespace
map/foreach
Chunks/Modules/Parents
methods are now deprecated/removedcreateGenerator
andgenerator
hooks for NormalModuleFactory to customize code generationThe text was updated successfully, but these errors were encountered: