| 1 | const path = require('path') | = | 1 | const path = require('path') |
| 2 | 2 | |||
| 3 | module.exports = { | 3 | module.exports = { | |
| 4 | transpileDependencies: [ | 4 | transpileDependencies: [ | |
| 5 | /\bvue-echarts\b/, | 5 | /\bvue-echarts\b/, | |
| 6 | /\bresize-detector\b/, | 6 | /\bresize-detector\b/, | |
| 7 | /\bvue-c3\b/, | 7 | /\bvue-c3\b/, | |
| 8 | /\bvue-masonry\b/, | 8 | /\bvue-masonry\b/, | |
| 9 | /\bvue-cropper\b/ | <> | 9 | /\bvue-cropper\b/, |
| 10 | /\bvuedraggable\b/ | |||
| 10 | ], | = | 11 | ], |
| 11 | chainWebpack: config => { | 12 | chainWebpack: config => { | |
| 12 | // Add "node_modules" alias | 13 | // Add "node_modules" alias | |
| 13 | config.resolve.alias | 14 | config.resolve.alias | |
| 14 | .set('node_modules', path.join(__dirname, './node_modules')) | 15 | .set('node_modules', path.join(__dirname, './node_modules')) | |
| 15 | 16 | |||
| 16 | // Disable "prefetch" plugin since it's not properly working in some browsers | 17 | // Disable "prefetch" plugin since it's not properly working in some browsers | |
| 17 | config.plugins | 18 | config.plugins | |
| 18 | .delete('prefetch') | 19 | .delete('prefetch') | |
| 19 | 20 | |||
| 20 | // Do not remove whitespaces | 21 | // Do not remove whitespaces | |
| 21 | config.module.rule('vue') | 22 | config.module.rule('vue') | |
| 22 | .use('vue-loader') | 23 | .use('vue-loader') | |
| 23 | .loader('vue-loader') | 24 | .loader('vue-loader') | |
| 24 | .tap(options => { | 25 | .tap(options => { | |
| 25 | options.compilerOptions.preserveWhitespace = true | 26 | options.compilerOptions.preserveWhitespace = true | |
| 26 | return options | 27 | return options | |
| 27 | }) | 28 | }) | |
| 28 | } | 29 | } | |
| 29 | } | 30 | } |