pinafore/webpack/shared.config.js
Nolan Lawson 13792aef66
perf: switch from inferno to preact, use emoji-mart prerelease (#1094)
* perf: switch from inferno to preact, use emoji-mart prerelease

* use preact@10
2019-03-10 14:13:05 -07:00

23 lines
525 B
JavaScript

const svgs = require('../bin/svgs')
const inlineSvgs = svgs.filter(_ => _.inline).map(_ => `#${_.id}`)
const mode = process.env.NODE_ENV || 'production'
const dev = mode === 'development'
const resolve = {
extensions: ['.js', '.json', '.html'],
mainFields: ['svelte', 'module', 'browser', 'main'],
alias: {
'react': 'preact/compat/dist/compat.js',
'react-dom': 'preact/compat/dist/compat.js',
'preact/hooks': 'preact/hooks/dist/hooks.js'
}
}
module.exports = {
mode,
dev,
resolve,
inlineSvgs
}