videojs-overlay icon indicating copy to clipboard operation
videojs-overlay copied to clipboard

[4.0.0] CSS is not exported

Open boris-petrov opened this issue 1 year ago • 1 comments

When I update to version 4 (congrats on the release!), I get:

Module not found: Error: Package path ./dist/videojs-overlay.css is not exported from package /tmp/broccoli-413759BmMR0kc7xnZ/cache-369-webpack_bundler_ember_auto_import_webpack/node_modules/videojs-overlay (see exports field in /tmp/broccoli-413759BmMR0kc7xnZ/cache-369-webpack_bundler_ember_auto_import_webpack/node_modules/videojs-overlay/package.json)

Which is true - there is an exports field in package.json but it doesn't contain the CSS - I guess it must be so people can use it. :) At least according to Webpack.

boris-petrov avatar Oct 29 '24 11:10 boris-petrov

workaround:

add an alias to your webpack config:

const config = {
	resolve: {
		'videojs-overlay/dist/videojs-overlay.css': path.resolve('./node_modules', './videojs-overlay/dist/videojs-overlay.css')
	}
};

cb-eli avatar Oct 16 '25 06:10 cb-eli