Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:08

    dependabot[bot] on npm_and_yarn

    (compare)

  • 02:08
    dependabot[bot] closed #16105
  • 02:08
    webpack-bot labeled #16129
  • 02:08

    dependabot[bot] on npm_and_yarn

    Bump simple-git from 2.48.0 to … (compare)

  • 02:08
    dependabot[bot] labeled #16129
  • 02:08
    dependabot[bot] opened #16129
  • 02:02

    dependabot[bot] on npm_and_yarn

    (compare)

  • 02:02
    dependabot[bot] closed #16123
  • 02:02

    dependabot[bot] on npm_and_yarn

    Bump eslint-plugin-jest from 24… (compare)

  • 02:02
    webpack-bot labeled #16127
  • 02:02
    dependabot[bot] labeled #16127
  • 02:02
    dependabot[bot] opened #16127
  • Aug 08 10:46
    tzachbon closed #16007
  • Aug 08 02:05

    dependabot[bot] on npm_and_yarn

    (compare)

  • Aug 08 02:05

    dependabot[bot] on npm_and_yarn

    Bump eslint-plugin-jest from 24… (compare)

  • Aug 08 02:05
    dependabot[bot] closed #16104
  • Aug 08 02:05
    webpack-bot labeled #16123
  • Aug 08 02:05
    dependabot[bot] labeled #16123
  • Aug 08 02:05
    dependabot[bot] opened #16123
  • Aug 06 12:34
    AnmolBansalDEV edited #16122
SUFFT-boop
@SUFFT-boop
How may I help you
pauliunas
@pauliunas:matrix.org
[m]
say I have resolve: { mainFields: ["main", "module"] } in my webpack config... is it possible to override that based on the import path? something like module: { rules: { test: /^@azure\/storage-blob/, mainFields: ["module", "main"] } }
Hany Morcos
@hanymorcos
The module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack.
BREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature.
You need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecated).
For files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: "webassembly/async"').
(Source code omitted for this binary file)
Good Morning from NVA.
I can't get passed webassembly module error.
Even though I passed the correct flags to webpack.
Hany Morcos
@hanymorcos
I even tried adding config variables to the webpack method . Still no luck?
config.experiments = { asyncWebAssembly: true, syncWebAssembly: true };
SUFFT-boop
@SUFFT-boop
Would you want me to help you out
pauliunas
@pauliunas:matrix.org
[m]
yes
Vanillma
@Vanillma
@SUFFT-boop
Please see them
&
Jakub Smékal
@smejak
Hi everyone, does anyone have experience with webpack config for nested node_modules? I am trying to create a jupyterlab extension but I keep getting a ReferenceError: Buffer is not defined
pauliunas
@pauliunas:matrix.org
[m]
isn't Buffer a nodejs-specific thing?
Jakub Smékal
@smejak
It's also a node_module yes
Is that an issue?
pauliunas
@pauliunas:matrix.org
[m]
a what?
I mean, normally people use webpack to bundle frontend code.. are you trying to bundle something that will run on node.js?
Jakub Smékal
@smejak
I am trying to bundle npm packages that are used in my jupyterlab extension
These packages normally run on node.js
pauliunas
@pauliunas:matrix.org
[m]
do you have target: "node" in your webpack config?
Jakub Smékal
@smejak
No, this is what my webpack config looks like
const webpack = require("webpack");

module.exports = {
  resolve: {
    extensions: [".tsx", ".ts", ".js", ".jsx", ".css"],
    modules: ["node_modules"],
    fallback: {
      buffer: require.resolve('buffer/'),
      http: require.resolve("stream-http"),
      https: require.resolve("https-browserify"),
      stream: require.resolve("stream-browserify"),
      buffer: require.resolve("buffer"),
      assert: require.resolve("assert/"),
      "multicodec": require.resolve("multicodec"),
      "content-hash": require.resolve("content-hash"),
      "web3-eth-ens": require.resolve("web3-eth-ens"),
      // "assert": false,
      // "browser": false,
    },
  },
  plugins: [
    // new NodePolyfillPlugin(),
    // // Work around for Buffer is undefined:
    // // https://github.com/webpack/changelog-v5/issues/10
    new webpack.ProvidePlugin({
      Buffer: ["buffer", "Buffer"],
    }),
    // new webpack.ProvidePlugin({
    //   process: "process/browser",
    // }),
  ],
};
pauliunas
@pauliunas:matrix.org
[m]
if your bundle is supposed to run on node, you should add that and remove the plugin
Jakub Smékal
@smejak
I'm not sure I fully understand the "run on node" part. The bundle is supposed to run in the browser in a jupyterlab instance, I don't think node can run there.
pauliunas
@pauliunas:matrix.org
[m]
oh ok, I guess I misunderstood you when you said "these packages normally run on node.js"
Jakub Smékal
@smejak
Yeah, normally they do, but I want to use them in jupyterlab, which is why I need the webpack config. Initially I was getting polyfill errors which I solved with the fallback, but now I'm still getting the buffer error
pauliunas
@pauliunas:matrix.org
[m]
ok I see... I assume you have buffer in your package.json dependencies?
Jakub Smékal
@smejak
yes
pauliunas
@pauliunas:matrix.org
[m]
hm, I'm not sure what's going on then, sorry I couldn't help
2 replies
by the way this chat seems very dead, you might have better luck elsewhere
shenlia
@shenlia
Red Envelope is the first token on the decentralized tree graph-based CONFILU eSpace chain. It benefits culture, conveys good fortune and imparts wealth.
The token address: 0 xeab0f89366a58336e54c3bbc1a44c0da22190bb5
Remember is CONFILU eSpace chain, tree graph red envelope community push.
Dark horse of the year.
https://red-envelope.mystrikingly.com/
1 reply
SUFFT-boop
@SUFFT-boop
If you want me to help you out you can just beep me
+14788224403
Ghost
@ghost~62ea1d1f6da03739849adba0
hi
Dimitri KOPRIWA
@kopax
Hello, how can I tell webpack 4 to use the esm version of a module within node_modules, instead of the CJS ? (So I can have tree shaking on it)
Austin-Hearty
@meredithyan
before: function (router) { before已经是webpack3.0 版本的内容,我们现在用的是5.0版本
router.get("./success", function (req, res) {
res.json({ id: 1 }); //200
});
router.post("./error", function (req, res) {
res.sendStatus(500);
});
},
this is my code in webpack3.0, but how do I uprade my code to webpack 5.0
Austin-Hearty
@meredithyan
  middlewares.unshift({
    name: 'fist-in-array',
    // `path` is optional
    path: '/foo/path',
    middleware: (req, res) => {
      res.send('Foo!');
    },
  });
but I can not specify the method like GET or POST
1 reply
sorry if I ask a stupid question, but it's really my first day on webpack
Anmol Bansal
@AnmolBansalDEV
Hey, I'm a newbie to open source, but I've decent command over javascript. How can I contribute to webpack repo? Thank you!
Curtis Maloney
@funkybob
hey all... am trying to hoist this old webpack v1 project into the current century... how do I persuade webpack to pull all the css into a separate file?
AIUI since some of my (react) code imports it and uses references to the class names ... e.g. className={s.foo} ... I need the css-loader.
and it's style-loader that embeds the css into the main bundle, is that correct?
Curtis Maloney
@funkybob
nm.... MiniCssExtractPlugin seems to have worked... was sure I tried it last week :/
Curtis Maloney
@funkybob
curiously, trying to also use CssMinimizerPlugin seems to pull a lot of the CSS back into the js file... and breaks source maps :/ (even though my devtool is set to a value the docs say it works with :/ )