Use dynamic version of emoji-datasource for the default sheet URL
parent
0d39e10a71
commit
462ba0cd26
|
@ -1,4 +1,6 @@
|
|||
var path = require('path')
|
||||
var pack = require('../package.json')
|
||||
var webpack = require('webpack')
|
||||
|
||||
module.exports = {
|
||||
entry: path.resolve('example/index.js'),
|
||||
|
@ -31,4 +33,10 @@ module.exports = {
|
|||
resolve: {
|
||||
extensions: ['', '.js'],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
EMOJI_DATASOURCE_VERSION: `'${pack.devDependencies['emoji-datasource']}'`,
|
||||
}),
|
||||
],
|
||||
}
|
||||
|
|
|
@ -113,8 +113,8 @@ Emoji.defaultProps = {
|
|||
set: 'apple',
|
||||
sheetSize: 64,
|
||||
native: false,
|
||||
backgroundImageFn: ((set, sheetSize) => `https://unpkg.com/emoji-datasource@${EMOJI_DATASOURCE_VERSION}/sheet_${set}_${sheetSize}.png`),
|
||||
onOver: (() => {}),
|
||||
backgroundImageFn: ((set, sheetSize) => `https://unpkg.com/emoji-datasource@2.4.4/sheet_${set}_${sheetSize}.png`),
|
||||
onLeave: (() => {}),
|
||||
onClick: (() => {}),
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
var path = require('path')
|
||||
var pack = require('../package.json')
|
||||
var webpack = require('webpack')
|
||||
|
||||
module.exports = {
|
||||
entry: path.resolve('src/index.js'),
|
||||
|
@ -42,6 +44,11 @@ module.exports = {
|
|||
extensions: ['', '.js'],
|
||||
},
|
||||
|
||||
plugins: [],
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
EMOJI_DATASOURCE_VERSION: `'${pack.devDependencies['emoji-datasource']}'`,
|
||||
}),
|
||||
],
|
||||
|
||||
bail: true,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue