@@ -1,5 +1,3 @@
-console.log('\n %c DPlayer 1.5.0 %c http://dplayer.js.org \n\n', 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
-
import './DPlayer.scss';
import utils, {isMobile} from './utils';
@@ -1 +1,4 @@
+// eslint-disable-next-line
+console.log(`\n %c DPlayer ${DPLAYER_VERSION} %c http://dplayer.js.org \n\n`, 'color: #fadfa3; background: #030307; padding:5px 0;', 'background: #fadfa3; padding:5px 0;');
+
module.exports = require('./DPlayer');
@@ -91,7 +91,10 @@ module.exports = {
},
plugins: [
- new webpack.NamedModulesPlugin()
+ new webpack.NamedModulesPlugin(),
+ new webpack.DefinePlugin({
+ DPLAYER_VERSION: `"${require('../package.json').version}"`
+ })
],
node: {
@@ -85,6 +85,9 @@ module.exports = {
+ }),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false