1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- module.exports = {
- presets: [
- // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
- '@vue/cli-plugin-babel/preset', '@babel/preset-env'
- ],
- 'env': {
- 'development': {
- // babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
- // This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
- 'plugins': ['dynamic-import-node',]
- }
- },
- plugins: [
- [
- 'import',
- {
- libraryName: 'vant',
- libraryDirectory: 'es',
- style: true,
- },
- 'vant',
- ],
- '@babel/plugin-proposal-optional-chaining',
- '@babel/plugin-proposal-nullish-coalescing-operator'
- ],
- }
- // module.exports = {
- // presets: [
- // '@vue/babel-preset-jsx',
- // [
- // '@babel/preset-env',
- // {
- // 'useBuiltIns': 'entry',
- // 'corejs': 3
- // }
- // ]
- // ],
- // 'env': {
- // 'development': {
- // 'plugins': ['dynamic-import-node']
- // }
- // }
- // }
|