anywhere-webpack-plugin

Detect and configure publicPath in run time

Usage no npm install needed!

<script type="module">
  import anywhereWebpackPlugin from 'https://cdn.skypack.dev/anywhere-webpack-plugin';
</script>

README

anywhere-webpack-plugin

A webpack plugin which detects publicPath automatically ( using document.currentScript API ), so that you can switch your CDN provider without building again. In other words, you can put webpack ouput files anywhere :airplane: you like.

Usage

require it in your entry file as early as possible

require('anywhere-webpack-plugin');

or, prepend it to your entry file definition

{
  entry:[
    'anywhere-webpack-plugin',
    'entry.js'
  ]
}

License

MIT