generated from JoviDeCroock/product-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc.js
37 lines (36 loc) · 786 Bytes
/
.babelrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const plugins = [
process.env.NODE_ENV !== 'production' && "@prefresh/babel-plugin",
'@babel/plugin-syntax-dynamic-import'
].filter(Boolean);
module.exports = {
env: {
modern: {
presets: [
['@babel/preset-modules', { loose: true }]
],
plugins: [
...plugins,
['babel-plugin-transform-jsx-to-htm', {
'import': {
'module': 'htm/preact',
'export': 'html'
}
}]
],
},
server: {
presets: [
['@babel/preset-modules', { loose: true }]
],
plugins: [
...plugins,
['babel-plugin-transform-jsx-to-htm', {
'import': {
'module': 'htm/preact',
'export': 'html'
}
}]
],
}
},
};