We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example webpack configuration:
import path from 'path' import webpack from 'webpack' import HtmlWebpackPlugin from 'html-webpack-plugin' import InlineSourcePlugin from 'html-webpack-inline-source-plugin' export default { context: path.resolve(__dirname, 'src'), entry: ['./index.js'], devtool: 'source-map', output: { publicPath: `https://my.cdn.com`, filename: '[name].[contenthash].js', path: path.resolve(__dirname, 'dist'), }, optimization: { runtimeChunk: 'single', splitChunks: { cacheGroups: { vendors: false, vendor: { name: 'vendor', chunks: 'initial', test: /node_modules/, priority: 20, }, }, }, }, plugins: [ new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new HtmlWebpackPlugin({ inlineSource: 'runtime.+\\.js', }), new InlineSourcePlugin(), ], resolve: { extensions: ['.js', '.jsx', '.scss'], modules: [ path.resolve(__dirname, 'src'), ], }, }
Output index.html:
index.html
... //# sourceMappingURL=https:/my.cdn.com/runtime.9a39f8dda0e7ff95bb67.js.map</script>
Note the single slash after https:
https:
The text was updated successfully, but these errors were encountered:
Don't use path.join when publicPath is a URL
path.join
publicPath
2f0c432
Fixes DustinJackson#67
Successfully merging a pull request may close this issue.
Example webpack configuration:
Output
index.html
:Note the single slash after
https:
The text was updated successfully, but these errors were encountered: