Where communities thrive


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

    sokra on main

    Honor `hashFunction` option for… Update PackFileCacheStrategy.js Merge pull request #14557 from … (compare)

  • 19:03
    sokra closed #14557
  • 19:02
    webpack-bot unlabeled #14557
  • 19:02
    webpack-bot labeled #14557
  • 14:43
    webpack-bot unlabeled #14557
  • 14:43
    webpack-bot labeled #14557
  • 14:20
    JonnyBurger synchronize #14557
  • 14:07
    webpack-bot labeled #14557
  • 13:44
    webpack-bot labeled #14557
  • 13:44
    JonnyBurger opened #14557
  • Oct 23 14:00
    lsycxyj edited #14491
  • Oct 23 13:59
    webpack-bot unlabeled #14491
  • Oct 23 13:59
    webpack-bot labeled #14491
  • Oct 23 13:59
    lsycxyj synchronize #14491
  • Oct 22 22:48
    webpack-bot unlabeled #14549
  • Oct 22 22:48
    webpack-bot labeled #14549
  • Oct 22 17:51
    webpack-bot unlabeled #14173
  • Oct 22 17:51
    webpack-bot labeled #14173
  • Oct 22 13:56
    webpack-bot labeled #10960
  • Oct 22 07:56

    sokra on main

    Initialize buildDependencies af… Merge pull request #14384 from … (compare)

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
or what plugins to use
dagtveit
@dagtveit
i see when i go to the /v2 url that it falls back to /dist/index.html
so why dosnt it also run the other plugins
and setting writeToDisk: true confirms this that it dosnt include the v2 file
dagtveit
@dagtveit
dosnt look like dev server respects that htmlwebpackplugin at all
dagtveit
@dagtveit
please help me here. i am so stuck
Alexander Akait
@alexander-akait
please don't spam
webpack-dev-server output all assets what you build
I can't undestand problem
dagtveit
@dagtveit
if i enable writetodisk on webpackdev server and look at that assets in that folder it is not the same content as if i do a normal build. bu ti can see in the log when starting it
Child HtmlWebpackCompiler:
     3 assets
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_1 = __child-HtmlWebpackPlugin_1
    Entrypoint HtmlWebpackPlugin_2 = __child-HtmlWebpackPlugin_2
Alexander Akait
@alexander-akait
What is difference, devserver doesn't change in you configuration
dagtveit
@dagtveit
i am missing the /v2/ folder where there should be another index file
Alexander Akait
@alexander-akait
debug code
it is easy
dagtveit
@dagtveit
i have no ide how to do that on webpack. but i found something in the log here can this be a problem. do i have to manualy map out the dirrent folders
 [6] multi (webpack)-dev-server/client?http://localhost aurelia-webpack-plugin/runtime/empty-entry aurelia-webpack-plugin/runtime/pal-loader-entry aurelia-bootstrapper 64 bytes {AureliaApp~d0ae3f07} [built]
 [9] multi (webpack)-dev-server/client?http://localhost ./settings/Active/Settings.js 40 bytes {Settings~d0ae3f07} [built]