-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbabel.config.js
37 lines (37 loc) · 948 Bytes
/
babel.config.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
// babel-preset-taro 更多选项和默认值:
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
/* eslint-disable import/no-commonjs */
module.exports = {
// See name normalization for more specifics on configuring the path of a plugin or preset.
// https://babel.dev/docs/en/options#name-normalization
presets: [
[
'taro',
{
framework: 'vue3',
ts: true,
},
],
],
plugins: [
[
'import',
{
libraryName: '@nutui/nutui',
libraryDirectory: 'dist/packages/_es',
camel2DashComponentName: false,
},
'nutui3-vue',
],
[
'import',
{
libraryName: '@nutui/nutui-taro',
libraryDirectory: 'dist/packages/_es',
style: (name /* ,file */) => name.toLowerCase().replace('_es/', '') + '/index.scss',
camel2DashComponentName: false,
},
'nutui3-taro',
],
],
};