Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 01 22:00
    webpack-bot labeled #10646
  • Apr 01 22:00
    webpack-bot unlabeled #10646
  • Apr 01 21:39
    webpack-bot unlabeled #10646
  • Apr 01 21:39
    webpack-bot labeled #10646
  • Apr 01 21:36
    ScriptedAlchemy synchronize #10646
  • Apr 01 21:36
    webpack-bot unlabeled #10646
  • Apr 01 21:36
    webpack-bot labeled #10646
  • Apr 01 21:36
    ScriptedAlchemy synchronize #10646
  • Apr 01 13:10
    mohsen1 synchronize #10631
  • Apr 01 13:08
    webpack-bot labeled #10631
  • Apr 01 13:08
    webpack-bot unlabeled #10631
  • Apr 01 13:08
    mohsen1 synchronize #10631
  • Apr 01 11:58
    vankop closed #10637
  • Apr 01 09:23
    webpack-bot labeled #10631
  • Apr 01 09:23
    webpack-bot unlabeled #10631
  • Apr 01 09:21
    sokra synchronize #7075
  • Apr 01 09:21

    sokra on npm_and_yarn

    (compare)

  • Apr 01 09:21

    sokra on master

    Bump @types/node from 12.12.32 … Merge pull request #10643 from … (compare)

  • Apr 01 09:20
    sokra closed #10643
  • Apr 01 09:20
    webpack-bot unlabeled #10646
Alex Barker
@kwhat
Yah, I think going back to C is probably a better long term solution. The last 3 years have really just destroyed everything I have ever enjoyed about development.
It seems to just get more and more complex with a lot of on paper benefits that never materialize. You guys seem to enjoy this stuff, so please keep it. It makes the rest of us want to kill ourselves.
Peter Müller
@Munter
Dude, the reason this is hard is that you are using libraries from before the dependency graph era. Everybody struggles getting 10 year old tech to work
The need for the amd override surprised me
Harimau melaya
@HarimauApapap_twitter
Hi
afrozMT
@afrozMT

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
`

I am using latest webpack version. I am unable to infer what it is for webpack for load a module when there is no loader/plugin involved.
Evilebot Tnawi
@evilebottnawi
A lot of modules without loaders took 56,412 ms
afrozMT
@afrozMT
Yes, thats what i am trying to undestand
when there is no loader involved, what is it webpack taking time then ?
Evilebot Tnawi
@evilebottnawi
on parsing import/export/require/module.exports
afrozMT
@afrozMT
OKay, so what could be reason(s) for such erroneous time. Any pointer ?
Evilebot Tnawi
@evilebottnawi
Maybe a lot of dependencies, hard to say without source
afrozMT
@afrozMT

/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", }

still it took 3,023 ms
Evilebot Tnawi
@evilebottnawi
maybe :smile:
afrozMT
@afrozMT
overall build time has increased, which justifies this :\
Evilebot Tnawi
@evilebottnawi
maybe you use import { something } from 'my.json'?
afrozMT
@afrozMT
yes we use this :
import ICON_MAP from './icon.config.json';
Evilebot Tnawi
@evilebottnawi
I mean named import: import { name } from 'something'
afrozMT
@afrozMT
nope we never did that.
just one instance if import
Evilebot Tnawi
@evilebottnawi
hm, need profile, it is easy and allow to solve problem fast
afrozMT
@afrozMT
do you mean CPU profile ?
Evilebot Tnawi
@evilebottnawi
no, code
will be great to look on configuration
afrozMT
@afrozMT
here is my webpack config if you want to have quick glance:
http://dpaste.com/0CJQZW5
Evilebot Tnawi
@evilebottnawi
maybe using cache-loader for css-loader can decrease compilation time (solved in webpack@5)
afrozMT
@afrozMT
Intresting part is build time is drastically reduced when using babel6 . this problem came when i updared it to babel 7
Evilebot Tnawi
@evilebottnawi
maybe some plugins very slow
afrozMT
@afrozMT
all i ran was just just babel-upgrader script
Evilebot Tnawi
@evilebottnawi
try to profile, it can solve problem
Andrew Kvapil
@viluon
Hi, is this a good place to ask for help? What I'm dealing with doesn't seem to have an answer on StackOverflow
I'm basically trying to reimplement the i18n webpack plugin with the new APIs, but the documentation seems to be lacking at best
John Marinelli
@johnmarinelli
for TerserPlugin is there a way to configure the time that a file stays in the cache ? for example, if i run a webpack build, i would want the output from Terser to be cached for 1 day
KioriSun
@KioriSun
Hey guys, with webpack, is there a way to bundle only some "ES6 imports" into a file(single build), while leaving other files as independent module scripts to be loaded at runtime?
(This is with Typescript btw)
Each of these files might or might not have their own subfolders, etc.
Gregory Danko
@g-style
Hey Guys! Is there a way to add a hash to dynamically imported chunk name?
Example: () => import(/ webpackChunkName: "MainPage.[hash]" / './Pages/MainPage');
John Marinelli
@johnmarinelli
@g-style it looks like you can only use [index] and [request]: https://webpack.js.org/api/module-methods/#magic-comments
why do you want the hash name in the file? i think webpacks' chunk manifest already covers mapping from "MyFile.js" => "MyFile.h4sh.js". my company has a special mechanism for this, so i am not sure
Rob Christian
@robchristian
I'm having trouble finding examples or docs for compiling coffeescript with modern webpack. I have a legacy project I have to support with a fair number of coffeescript files. Also, the webpack docs mention coffee-script, this module is deprecated and points to coffeescript (no hyphen)
Paul Schreiber
@paulschreiber

If I have this webpack 3 config snippet:

        new webpack.optimize.CommonsChunkPlugin({
            name: uid,
            chunks: [ 'home', 'about' ]
        })

What would be the equivalent config for optimization.splitChunks in webpack 4?

Rob
@rm-rf-etc
Uhhhgg. I can't, for the life of me, get webpack file-loader to load files!!!
ERROR in Entry module not found: Error: Can't resolve './src' in '/Users/me/projectDir'
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]',
            },
        }],
    },
}
Rob
@rm-rf-etc
Dude, WTH?? Webpack exits with an error code, EVEN THOUGH my files copied without error. W T H.
    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/'),
        }]),
    ],
}
Gregory Danko
@g-style
@johnmarinelli I need the hash name because of cache on prod. Every time we update production server, dynamically imported chunks needs to be updated on our clients machines but it doesn't happens because of cache.
Diego Gullo
@bizmate
Maybe not a webpack specific question but wondering if anyone can point me in the right direction. i am running yarn encore, ... components do import react, such as import React from 'react';
How can i make it a dependency without importing it so i can require it from a cdn and keep my scripts lean?
George Maged
@grgops_gitlab

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

John Marinelli
@johnmarinelli