Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 27 20:56
    webpack-bot labeled #10455
  • Feb 27 20:22
    webpack-bot unlabeled #10455
  • Feb 27 20:22
    dependabot-preview[bot] synchronize #10422
  • Feb 27 20:22
    dependabot-preview[bot] synchronize #10455
  • Feb 27 20:22

    dependabot-preview[bot] on npm_and_yarn

    chore(deps-dev): bump typescrip… (compare)

  • Feb 27 20:22

    dependabot-preview[bot] on npm_and_yarn

    chore(deps-dev): bump @babel/co… (compare)

  • Feb 27 20:22
    dependabot-preview[bot] edited #10455
  • Feb 27 20:22
    dependabot-preview[bot] edited #10422
  • Feb 27 20:21
    sokra synchronize #7075
  • Feb 27 20:21
    webpack-bot labeled #10455
  • Feb 27 20:21
    webpack-bot unlabeled #10455
  • Feb 27 20:21
    dependabot-preview[bot] edited #10422
  • Feb 27 20:21
    dependabot-preview[bot] edited #10455
  • Feb 27 20:21

    sokra on master

    chore(deps): update `jest` chore(deps): update `jest` chore(deps): update `jest` and 2 more (compare)

  • Feb 27 20:21

    sokra on chore-deps-update-jest

    (compare)

  • Feb 27 20:21
    sokra closed #10443
  • Feb 27 20:21
    webpack-bot labeled #10443
  • Feb 27 20:21
    webpack-bot unlabeled #10443
  • Feb 27 18:44
    webpack-bot labeled #10459
  • Feb 27 18:28
    webpack-bot labeled #10459
Diego Gullo
@bizmate
ronaklalwaniii
@ronaklalwaniii
Thanks, @bizmate i'll check it out.
Peter Müller
@Munter
@tsuby So you just want all files to be content addressable? I highly recommend upgrading your webpack version to opt into those new things
Asim KT
@asimqt
Hi, Can I run my webpack configuration sequentially?.
module.exports = [
  {
    ...webpackConfig,
    ...resolveConfig,
    ...{
      entry: customEntry,
      plugins: enhancedPlugin,
      output: customOutput
    },
    externals
  },
  {
    ...webpackConfig,
    ...resolveConfig,
    ...{
      entry: customEntry,
      plugins: enhancedPlugin,
      module: { ...webpackModule, ...{ rules: enhancedRules } }
    }
  }
];
I actually want one normal bundling for all files and one special library bundling for one specific file. Now things are working in my favor. (It's not perfect) But I want the order to be specified.
Asim KT
@asimqt
Anyone? :)
John Marinelli
@johnmarinelli
@asimqt here is the entrypoint for Multi-config webpack: https://github.com/webpack/webpack/blob/master/lib/webpack.js#L35
it looks like order should be whatever you have in module.exports
Asim KT
@asimqt
mm.. I tried that. In my local system, the order is fine and it's building in different order. Is there a chance that the compiler.run(callback) code will run it in parellel?
@johnmarinelli
Thanks.
John Marinelli
@johnmarinelli
@asimqt i'm not sure because I didn't dig too deep in the code
i think it does though. we use a multi config, but it's an Object, not an Array. the order is the same each time and is alphabetical
Peteris Erins
@Pet3ris

I'm using css-loader to import CSS files while also doing css-in-js using bs-css after the css-loader import has been loaded.

The problem - it seems like the css order between the two files is not deterministic. Sometimes one loads ahead, other times it's the other. Are there any ways to control where styles will be loaded onto the page?

M Xu
@mx2323
hey everyone
ive spent the last few days trying to get my CRA app ported to electron :(
between webpack, babel and eslint issues im really confused.
i think i am close… but im hitting this issue
im trying to get webpack to use the non-browser version of superagent in my electron app
but like this issue says using target:’electron-renderer’ causes webpack to pick up the browser version
deAtog
@deAtog
@mx2323 you can change resolve.mainFields so that it will only pick up the main entry from a package's package.json file. This may or may not fix your issue though.
M Xu
@mx2323
Yeah im trying that now (tried it already but it caused all kinds of weird issues)
deAtog
@deAtog
@mx2323 the other option is to provide the absolute path to the file from the node package that you want to import instead of relying on the default resolve behavior
M Xu
@mx2323
the libraries that i am using are relying on the browser field in package.json to package differently… not sure how i would provide an ‘absolute path’
so i tried setting mainFields.. and then i get weird stuff like this -
image.png
maybe i need to still specify the target:’electron-renderer’ even when im setting mainFields in webpack.config.js…
brb going to try that
deAtog
@deAtog
@mx2323 you should be able to do: import ... from 'package/path;
M Xu
@mx2323
well… setting target:’electron-renderer’ at least gets me back to a working page
image.png
the documentation for superagent says this -
M Xu
@mx2323
looks like superagent is using aliasFields :[‘browser’] to override the js file that is used
M Xu
@mx2323
@deAtog i didnt understand what u were saying there
if i set mainFields:[‘main’, ‘module’]… does that cause my app to use node’s http module for all ajax calls?
M Xu
@mx2323
well - i just used a nodejs specific library instead of superagent and everything appears to be ok
but yeah this issue - webpack/webpack#7953 huge PITA. trying to package two different versions, one for node, one for electron, one for web. and getting that work…. is not easy
skipping for now
Cory Simmons
@corysimmons
Is Webpack good for things like just adding Babel to an Express app?
If so, is it better to use the same webpack config for React and Express?
That is, I'm trying to make a React/Express boilerplate. My initial plan was to add Webpack to my client folder, and then just @babel/cli to my server folder.
If I can reuse the same config (the same babel config) that'd be cool.
Cory Simmons
@corysimmons
At first glance it seems like no. It seems like I can have multiple entrypoints (for "chunking"?) but only one output. That said, I can probably just import the same babel.config.js to both.
John Marinelli
@johnmarinelli
@corysimmons if all you really need is babel, i wouldn't use webpack
i would just use babel cli
if you want to make a react + express project you'd have to have two different configs, because one is targetting the browser & the other targets node.js
Cory Simmons
@corysimmons
Hmm okay thank you
I have another question, this has plagued me for a while. Why can't I traverse the filesystem upwards with Webpack? For instance if I have a project with ./foo.js and ./client/index.js and within index.js I do something like const foo = require('../foo.js') it will throw. But if I migrate foo inside the client dir, it works.
It would be very handy for organizational purposes to be able to migrate foo.js to anywhere in parent directories.