Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 27 20:06
    thomastay synchronize #16671
  • Jan 27 03:11

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jan 27 03:11
    dependabot[bot] closed #16667
  • Jan 27 03:11
    webpack-bot labeled #16678
  • Jan 27 03:11
    dependabot[bot] labeled #16678
  • Jan 27 03:11

    dependabot[bot] on npm_and_yarn

    chore(deps-dev): bump jest-cli … (compare)

  • Jan 27 03:11
    dependabot[bot] opened #16678
  • Jan 27 03:10

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jan 27 03:10
    dependabot[bot] closed #16665
  • Jan 27 03:10
    webpack-bot labeled #16677
  • Jan 27 03:10
    dependabot[bot] labeled #16677
  • Jan 27 03:10

    dependabot[bot] on npm_and_yarn

    chore(deps-dev): bump pretty-fo… (compare)

  • Jan 27 03:10
    dependabot[bot] opened #16677
  • Jan 27 03:09

    dependabot[bot] on npm_and_yarn

    (compare)

  • Jan 27 03:09
    dependabot[bot] closed #16666
  • Jan 27 03:09
    webpack-bot labeled #16676
  • Jan 27 03:09
    dependabot[bot] labeled #16676
  • Jan 27 03:09

    dependabot[bot] on npm_and_yarn

    chore(deps-dev): bump jest-diff… (compare)

  • Jan 27 03:09
    dependabot[bot] opened #16676
  • Jan 27 03:09

    dependabot[bot] on npm_and_yarn

    (compare)

zwx00
@zwx00
hey, using the import() function, is there a way to specify which loader it should employ?
instead of doing it in the main configuration file
like a magic comment approach or something
horologix
@horologix_gitlab
This is probably a silly question, but are production builds meant to be built from production? Or is it that you build dev/prod in development and choose which one to serve?
horologix
@horologix_gitlab

The example from the DefinePlugin page shows

new webpack.DefinePlugin({
  'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
});

which doesn't make sense unless you were to build from production.

joe
@joepagan
Hey, I am trying to use a webpack build hash as an ENV var to my app for cache busting, however, the suggestions I have found so far are limited and do not work.
This SO post tries to do the same thing: https://stackoverflow.com/questions/39082976/how-to-pass-the-build-hash-as-an-environment-variable-in-webpack
However, the ExtendedAPIPlugin which is supposed to make a new variable __webpack_hash__ available is not defined when I load & run it.
Does anyone have any further suggestions?
romantic艾克
@1sunzichen
hello
James Drawneek
@jmdrawneek
Anyone got any ideas why my webpack entrypoint is no longer firing? I was just doing some refactoring to try to squeeze some more performance out of my setup and now it doen't execute.
The entry point is within the main file and the main file is running, but it doesn't seem to hit my code.
Does anyone know where webpack calls the entry point js? I've dropped some breakpoints in to check what's running but webpack is a bit of a maze
James Drawneek
@jmdrawneek
My entry point is listed in deferredModules, is that correct?
James Drawneek
@jmdrawneek
So it looks like another entry point as appeared?! called loaders - any idea where this has come from? I only noticed from looking at the stats printing in the console
Ugh 🤦🏻‍♂️ there was a chunk filter out some required files
Xixiang Chen
@nelsonchen90

Hi :wave:
the recent upgrade 3.7.1 of webpack-dev-middleware causes the following error. When I downgrade to 3.7.0 everything is fine:

✖ 「wdm」: TypeError: Cannot read property 'tapAsync' of undefined
    at compiler.hooks.emit.tap (****/webpack-dev-middleware/lib/fs.js:18:37)
    at _next3 (eval at create (****/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:10:1)
    at _err3 (eval at create (****/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:25:1)
    at callback (****/copy-webpack-plugin/dist/index.js:77:17)
    at ****/copy-webpack-plugin/dist/index.js:118:24
    at <anonymous>

any ideas?

Alexander Akait
@alexander-akait
update webpack to latest version
Ashish J Galagali
@ashishjg21
can anyone plz guide me to install exercism
joe
@joepagan
Ok I think I misunderstood how to use the ExtendedAPIPlugin, I believe was was to make __webpack_hash__ available within my build is that correct?
I want to get access to the hash at the webpack config level, is that possible?
lwwen
@lwwen
image.png
hello everyone,who knows that i write have some error?
OluwatosinAdegoke
@OluwatosinAdegoke
Does webpack affect CSS even without the css-loader and style-loader installed?
John Marinelli
@johnmarinelli
@OluwatosinAdegoke don't think so
@nelsonchen90 what is your webpack version? ./node_modules/.bin/webpack --version
Kevin Pinto
@ShakurOo
Hello guys, I setup a react webpack project + typescript. But after the compilation, I have a Cannot read Component of undefined.
So i put <script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.8.6/umd/react.production.min.js"></script> in my index.html, and that does the job. But i would like to know why webpack doesn't not integrate react (from node_modules) itself in the finalbundle.js ? :O
John Marinelli
@johnmarinelli
@ShakurOo post relevant parts of your config
Kevin Pinto
@ShakurOo

Ok I found the problem... And it was me. I putted this entries in my webpack.config.js :

    externals: {
      'react': 'React',
      'react-dom': 'ReactDOM'
    },

This lines skip the node_modules importations and use global variables instead ^^"

thx @johnmarinelli
Chad Wilken
@chadwilken
I just upgraded to webpack 4 from 3 and I keep getting errors about my redux actions. I export them all from an index file that imports them using the import * as projectActions from './projects'. The error is "export 'addPhotosToReport' was not found in 'actions'". I have been Googling and tinkering but can't figure it out. Any ideas?
Chad Wilken
@chadwilken
Ahh it looks like you just do export * from './projects' now
Andrii Tsok
@AndriiTsok

Hello, community! I have a question about bundling dependency js library (it is not an NPM lib and it was bundled with webpack for browser <script>.. just a .js file) into my new library that I build using typescript.

How to define and inject this .js library into my final bundle?

Luke Kang
@kidkkr

TerserPlugin 2.0.0 has an issue with

        cache: true,
        parallel: true,
        sourceMap: true

option. FYI

Alexander Akait
@alexander-akait
@kidkkr issue? What issue?
Cache and parallel true by default
Luke Kang
@kidkkr
It omits node_modules (I guess) code.
Alexander Akait
@alexander-akait
What? No
We uglify you bundled code
Luke Kang
@kidkkr
Umm.. It minify codes like starts like this:
=n(19)},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return rt}),n.d(t,"b",function(){return we}),n.d(t,"d",function(){return ot});var r=n(3),i=n.n(r),o=n(14),a=n.n(o),l=n(0),s=n.n(l),u=n(15),c=n(4),f=n(5),d=(n(27),n(17)),p=n(18),h=function(e,t){for(var n=
why is =n(19)}, presented, I don't know why
Alexander Akait
@alexander-akait
it is require('something')
We don't change in minify algorithm, just bump node version and set some options by default
Luke Kang
@kidkkr
Thank you! I will try
faligowski
@faligowski
I'm getting started with Webpack, but in the beginning have some troubles. When deleted [script src="...lodash" and push index.html into dist folder where is main.js, I have "Cannot GET /index.html"
I'm learning step by step with tutorial here
Alexander Akait
@alexander-akait
contentBase
faligowski
@faligowski
What exactly should I do?
Alexander Akait
@alexander-akait
put index.html in you root folder
faligowski
@faligowski
Doesn't work. Did everything like in the tutorial
Chris
@ipatch
@faligowski think you forgot to post the link to the tutorial your following, also i'd follow the docs posted on the official webpack site as opposed to following some third party tutorial that more than likely is out of date because things in webpack's world move fast ...really really fast

Question when using webpack and starting / stopping the server for whatever reason, more often then not I'm editing the actual webpack configuration file, and when i stop then start webpack will launch a window / tab in my default browser but will launch a completely new tab as opposed to reusing the existing open tab.

Has anyone developed a solution where if I stop a webpack dev server and have an existing tab that was associated with a running dev server instance that when i startup webpack again it will "intellegently" (and i use that term loosely) check to see if there is a tab open with the domain or socket that was being used and reconnect to the existing tab? it's quite tedious to close, open, shuffle tabs while working with configuration changes that require the dev server to stopped then started.

Alexander Akait
@alexander-akait
It is impossible to solve