Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 08:01
    vankop edited #14844
  • 08:01
    webpack-bot labeled #14844
  • 08:01
    vankop opened #14844
  • 08:00

    vankop on fix-14678

    fix regexp in DefaultStatsPrint… (compare)

  • 05:43

    vankop on fix-support-cache-out-of-box-for-multi-compiler-mode

    (compare)

  • 05:42
    vankop closed #11880
  • Nov 26 18:55
    vankop closed #9149
  • Nov 26 18:52
    vankop closed #7832
  • Nov 26 18:45
    vankop closed #6268
  • Nov 26 09:42
    webpack-bot labeled #14838
  • Nov 26 09:42
    vankop opened #14838
  • Nov 26 08:42

    sokra on main

    improve runtime template - add… rename to runtimeTemplate.conca… Merge branch 'main' into improv… and 2 more (compare)

  • Nov 26 08:42

    sokra on improve-runtime-template

    (compare)

  • Nov 26 08:42
    sokra closed #14784
  • Nov 26 08:42
    sokra synchronize #14628
  • Nov 26 08:36

    vankop on issue-12924

    (compare)

  • Nov 26 08:36
    vankop closed #12927
  • Nov 26 08:24

    dependabot[bot] on npm_and_yarn

    (compare)

  • Nov 26 08:24
    sokra closed #14752
  • Nov 26 08:23

    sokra on main

    chore(deps-dev): bump date-fns … Merge pull request #14779 from … (compare)

Alexander Akait
@alexander-akait
:+1:
Diego Gullo
@bizmate
what is the webpack regular expression syntax for "watch:js": "onchange 'js/*.js' -- npm run build:js",
that one is not a PCRE, and I am trying to match any subfolder too
Alexander Akait
@alexander-akait
'js/**/*.js'
it is glob
Diego Gullo
@bizmate
is glob a type of syntax?
Alexander Akait
@alexander-akait
i can't undestand
Diego Gullo
@bizmate
how do you know this is the syntax to use? is there a manual. also i just tried and it is not working :/
Alexander Akait
@alexander-akait
Diego Gullo
@bizmate
thanks for the link, dont know why but it is not updating even if I refresh the page
i think i need to change something else in my package
json
Rob
@rm-rf-etc
Having trouble launching devserver in a child process and making sure it kills off all resulting node processes. Seems that devserver results in 3 separate processes, and I can only kill off 2 of them via child_process.kill. Not seeing much about this in search results.
Raghava
@Raghav009
HI i am trying to set the output.publicpath : window.location.origin + window.location.pathname.split('Web')[0] + 'Web/Scripts/dist/app2/' is this possible in webpack4 , as i am getting error webpack-cli : window is not defined
Rob
@rm-rf-etc
@Raghav009 webpack runs in nodejs, there's no window object in the nodejs environment
What would you use location.pathname for in webpack? And what are you expecting for the value of location.pathname?
Raghava
@Raghav009
@rm-rf-etc i wanted to use dynamic path so url is looks like this Ex: "http://testing{countrycode}.com/data/{country}/Web/Customers/invoice/index/bills" it will we deployed in multiple sites so i wanted to make it dynamic and all my scripts will be deployed at the Web folder and that to we have many servers
Raghava
@Raghav009
The Problem came only when we have to load dynamic Chunks on the particular servers for different routs
Rob
@rm-rf-etc
@Raghav009 I don't think you need window.location.pathname for this. When webpack first starts, you won't have window available. But if you really haaaaad to do it this way, I suppose you could first start a web server, connect to it (with your browser), and use that request to launch webpack with the data from the initial request.
I probably don't understand your use case though
Otherwise, just set some environment variables and build our publicPath that way.
dagtveit
@dagtveit
i have an aurelia project that uses some gulp task to run webpack build and webpack dev server. when i run with the server it dosnt watch and build my static files like html and stuff
while the build does. can anyone help me configure it so that it builds also the static files
watch it i mean
Raghava
@Raghav009
@rm-rf-etc thanks for the inputs
dagtveit
@dagtveit
can somone tell me the difference between the webpack dev server and build command wy dosnt the webpackdev server run the webpackcopy plugin
Raghava
@Raghav009
@dagtveit you can use webpack to watch your files but you need to configure them check this link "https://webpack.js.org/configuration/watch/#watch"
dagtveit
@dagtveit
i have 2 problems i think wanna solve the first one first.
and that is when i run the webpack dev server i am missing my settings.js files which is from a copy command
new CopyWebpackPlugin([
      {from: '**/*.js', to: outDir + '/activesetting', ignore: ['.*'], context: './settings/dev/'},
      {from: './settings', to: outDir + '/settings', ignore: ['.*']}, .......
so first of all it dosnt seem like the dev server is running any of those
dagtveit
@dagtveit
why arent those included in the dev server
Alexander Akait
@alexander-akait
because devserver works in memory
you need look in writeToDisk option
for devserver
dagtveit
@dagtveit
ok i fixed part of it with inlduing the file in the bundle.
settings was the most important part
dagtveit
@dagtveit
next problem is i have multiple entrypoints
Alexander Akait
@alexander-akait
And?
dagtveit
@dagtveit
and when i use the dev server it looks like it also dosnt build all the entrypoints
Alexander Akait
@alexander-akait
it is build all entrypoints
dagtveit
@dagtveit
is there a way to inspect the folder structyre it creates in memory
Alexander Akait
@alexander-akait
debugging?
dagtveit
@dagtveit
or let me refrase its again plugins like this
new HtmlWebpackPlugin({
  template: 'src/index.ejs',
  //excludeChunks: ['settings'],
  chunks: ['IdriftAppLight', 'AureliaApp', 'css'],
  filename: '/v2/index.html',
  metadata: {
    // available in index.ejs //
    title, baseUrl
  }
}),
new HtmlWebpackPlugin({
  template: 'srclegacy/index.ejs',
  filename: 'index.html',
  chunks: ['iDriftVendor', 'IDriftLegacyApp', 'cssLegacy',],
  metadata: {
    // available in index.ejs //
    title, legacyUrl
  }
}),
and it looks like /v2/index file dosnt exist
Alexander Akait
@alexander-akait
I don't know you need read docs for HtmlWebpackPlugin
dagtveit
@dagtveit
all works when i build
but not when i run the dev server again
should this also need to write to disk
how does dev server choose what to build