pinafore/webpack/shared.config.js
2019-08-03 13:49:37 -07:00

22 lines
487 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.module.js',
'react-dom': 'preact/compat/dist/compat.module.js'
}
}
module.exports = {
mode,
dev,
resolve,
inlineSvgs
}