Comments (3)
You should use require
as an argument, but all unnecessary things will be removed when minimizer minify your code
from webpack.
https://webpack.js.org/api/module-methods/#requireensure
Although the implementation of require is passed as an argument to the callback function, using an arbitrary name e.g. require.ensure([], function(request) { request('someModule'); }) isn't handled by webpack's static parser. Use require instead, e.g. require.ensure([], function(require) { require('someModule'); }).
feel free to feedback
from webpack.
I understand that the static parser is designed not to handle arbitrary names. However, my question is about the behavior when no argument are passed to the callback function. Specifically, does omitting argument in this scenario cause any issues or break the functionality in any case?
@alexander-akait
from webpack.
Related Issues (20)
- Destructured values from an imported namespace are mangled and returning undefined
- Chunk's `auxiliaryFiles` set contains `undefined` HOT 4
- @import CSS at-rule not always respected when determining order HOT 5
- `parser.hooks.new` not called for classes within the same file. HOT 7
- https://github.com/webpack/webpack.git
- Access to font from origin has been blocked by CORS policy
- Fetching remote-entry files dynamically and support of experiments.outputModule HOT 9
- Null
- Webpack overwrites custom objects passed into resolve.unsafeCache HOT 11
- Error: Uncaught ReferenceError: __webpack_require__ is not defined at HOT 2
- Option to keep /*webpackIgnore:true*/ in the bundle
- Can't import child_process HOT 1
- Module Federation loadRemoteModule catch error E[n].get is not a function
- Resolver type from webpack/enhanced-resolve are not compatible HOT 3
- v5.90.3 pollution global variables jquery $
- License scan badge shown as failing HOT 10
- `snapshot.unmanagedPaths` is ignored
- Module Federation - Some chunks are not loaded when navigating from the Remote module to the Host module
- failed to import ffmpeg-core.js HOT 1
- Webpack 5 doesnt generate the chunks of imports HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack.