For questions please post on Stack Overflow and use the 'webpack' tag (http://stackoverflow.com/tags/webpack).
vankop on up-enhanced-resolve
enhanced-resolve@5.10.0 (compare)
vankop on up-enhanced-resolve
enhanced-resolve@5.10.0 (compare)
sokra on main
add concatenate modules side ef… make imports order deterministic improve test case and 1 more (compare)
sokra on add-concatenate-modules-test-case
dependabot[bot] on npm_and_yarn
Hi
I am using speed-measure plugin to investigate long build time taken by webpack.
Unable to figure what is it which is taking time. Here is the snapshot of timing returned by speed measure plugin:
`
SMP ⏱
General output time took 61,459 ms
SMP ⏱ Plugins
HtmlWebpackPlugin took 1,492 ms
CircularDependencyPlugin took 510 ms
DefinePlugin took 1 ms
SMP ⏱ Loaders
modules with no loaders took 56,412 ms
median = 296 ms
mean = 306 ms
s.d. = 298.099 ms
range = (0 ms --> 3,023 ms)
module count = 3538
/Users/afrozalam/Code/mt-coaching-ui/node_modules/@mindtickle/mt-ui-components/src/Icon/icon.config.json = 3,023 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/rc-tween-one/es/plugin/StylePlugin.js = 2,795 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/rc-calendar/lib/date/DateTHead.js = 2,728 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/rc-calendar/lib/date/DateTBody.js = 2,726 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/@babel/runtime/helpers/toConsumableArray.js = 2,508 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/@babel/runtime/helpers/objectWithoutProperties.js = 2,503 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/whatwg-fetch/fetch.js = 2,286 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/@babel/runtime/helpers/slicedToArray.js = 2,208 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/intersection-observer/intersection-observer.js = 2,057 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/styled-components/dist/styled-components.browser.esm.js = 1,908 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/store/src/util.js = 1,889 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/redux-batched-actions/lib/index.js = 1,889 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/react/cjs/react.development.js = 1,393 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/html-entities/lib/html5-entities.js = 1,354 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/html-entities/lib/html4-entities.js = 1,333 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/@sentry/utils/misc.js = 1,333 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/html-entities/lib/xml-entities.js = 1,330 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/core-js/modules/_array-species-constructor.js = 1,308 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/core-js/modules/_is-object.js = 1,272 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/react-intl/locale-data/tr.js = 1,270 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/react-intl/locale-data/ts.js = 1,269 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/react-intl/locale-data/to.js = 1,267 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/ramda/es/whereEq.js = 1,265 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/ramda/es/without.js = 1,264 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/ramda/es/zip.js = 1,263 ms
/Users/afrozalam/Code/mt-coaching-ui/node_modules/ramda/es/xprod.js
`
/Users/afrozalam/Code/mt-coaching-ui/node_modules/@mindtickle/mt-ui-components/src/Icon/icon.config.json
this file is just a static map of constants:
{
"ADD": "add",
"ADD2": "add2",
"ADDCOMMENT": "addComment",
"ALERT": "alert",
"ANALYTICS": "Analytics",
"ANNOUNCEMENT": "announcement",
"ARROWUPDOWN": "arrowUpDown",
"ARROWUPRIGHT": "arrowUpRight",
"ASSET": "Asset",
"ATTACHEMENT": "attachement",
"ATTACHMENT": "attachment",
"AUDIO": "audio",
}
coffee-script
, this module is deprecated and points to coffeescript
(no hyphen)
module.exports = [{
mode: 'production',
module: {
rules: [{
test: /\.(jpe?g|gif|png|svg|woff|ttf|wav|mp3)$/i,
loader: 'file-loader',
options: {
name: '[path][name].[ext]',
},
}],
},
}
ERROR in Entry module not found: Error: Can't resolve './src' in '/Users/me/company/assets'
error Command failed with exit code 2.
const buildConfigs = [{
mode: 'development',
plugins: [
new CopyPlugin([{
from: path.join(__dirname, './src/images/'),
to: path.join(__dirname, './dist/images/'),
}]),
],
}
Hi guys, I'm new to webpack, and I'm developing an npm chat package. I can't figure out the correct to make an external dependency. I tried the following for the styled-components
package.
externals: {
"styled-components": {
commonjs: "styled-components",
commonjs2: "styled-components"
}
}
However, when I try importing the package to my main react app. styled-components
is not found in my package build file. I made sure styled-components
is installed on my main react app