2019-03-03 03:02:06 +00:00
|
|
|
const svgs = require('../bin/svgs')
|
|
|
|
|
|
|
|
const inlineSvgs = svgs.filter(_ => _.inline).map(_ => `#${_.id}`)
|
|
|
|
const mode = process.env.NODE_ENV || 'production'
|
2018-12-16 03:21:20 +00:00
|
|
|
const dev = mode === 'development'
|
|
|
|
|
2018-12-18 08:43:51 +00:00
|
|
|
const resolve = {
|
|
|
|
extensions: ['.js', '.json', '.html'],
|
2020-11-29 22:13:27 +00:00
|
|
|
mainFields: ['svelte', 'module', 'browser', 'main'],
|
|
|
|
alias: {
|
2021-02-15 23:07:19 +00:00
|
|
|
// All browsers we target support Intl.PluralRules (or it's polyfilled).
|
|
|
|
// So format-message-interpret can fall back to that. This file is pretty big (9.83kB) and it's not needed.
|
2020-12-20 23:33:41 +00:00
|
|
|
'./plurals': 'lodash-es/noop',
|
|
|
|
'lookup-closest-locale': 'lodash-es/noop' // small, but also not needed
|
2020-11-29 22:13:27 +00:00
|
|
|
}
|
2018-12-18 08:43:51 +00:00
|
|
|
}
|
|
|
|
|
2018-12-16 03:21:20 +00:00
|
|
|
module.exports = {
|
|
|
|
mode,
|
2018-12-18 08:43:51 +00:00
|
|
|
dev,
|
2019-03-03 03:02:06 +00:00
|
|
|
resolve,
|
2021-07-04 23:38:58 +00:00
|
|
|
inlineSvgs
|
2018-12-16 03:21:20 +00:00
|
|
|
}
|