emoji-mart-lazyload/example/webpack.config.js

54 lines
1.0 KiB
JavaScript

var path = require('path')
var pack = require('../package.json')
var webpack = require('webpack')
module.exports = {
entry: path.resolve('example/index.js'),
output: {
path: path.resolve('example'),
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.js$/,
use: 'babel-loader',
include: [
path.resolve('src'),
path.resolve('node_modules/measure-scrollbar'),
path.resolve('data'),
path.resolve('example'),
],
},
{
test: /\.svg$/,
use: [
{
loader: 'babel-loader'
},
{
loader: 'svg-jsx-loader',
options: {
es6: true
}
},
],
include: [
path.resolve('src/svgs'),
],
},
],
},
resolve: {
extensions: ['.js'],
},
plugins: [
new webpack.DefinePlugin({
EMOJI_DATASOURCE_VERSION: `'${pack.devDependencies['emoji-datasource']}'`,
}),
],
}