I was about to use the package served via CDN for a project when I realised the minification have issues in jsdelivr and seems to point to wrong file there.
Anyways, I tried using the file that's already in the repo's dist/lib , but it doesn't expose the root object globally.
For a quick fix, I changed the output for webpack.lib.conf from
output: {
path: config.lib.assetsRoot,
filename: utils.assetsLibPath('[name].min.js'),
library: '[name]',
libraryTarget: 'umd'
}
.
.
.
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsLibPath('[name].min.css')
}),
into
output: {
path: config.lib.assetsRoot,
filename: utils.assetsLibPath('epicspinners.min.js'),
library: 'epicspinners',
libraryTarget: 'umd'
}
.
.
.
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsLibPath('epicspinners.min.css')
}),
and the global object is back :slightly_smiling_face:
I was about to use the package served via CDN for a project when I realised the minification have issues in jsdelivr and seems to point to wrong file there.
Anyways, I tried using the file that's already in the repo's
dist/lib
, but it doesn't expose the root object globally.For a quick fix, I changed the output for
webpack.lib.conf
frominto
and the global object is back :slightly_smiling_face: