diff --git a/template/config/entry.js b/template/config/entry.js index 8ec674a..d80e618 100644 --- a/template/config/entry.js +++ b/template/config/entry.js @@ -1,5 +1,5 @@ const replace = require('rollup-plugin-replace'){{#flow}} -const flow = require('./rollup-plugin-flow'){{/flow}} +const flow = require('rollup-plugin-flow-no-whitespace'){{/flow}} const buble = require('rollup-plugin-buble') const banner = require('./banner') const pack = require('../package.json') diff --git a/template/config/rollup-plugin-flow.js b/template/config/rollup-plugin-flow.js deleted file mode 100644 index f97b457..0000000 --- a/template/config/rollup-plugin-flow.js +++ /dev/null @@ -1,15 +0,0 @@ -const flowRemoveTypes = require('flow-remove-types') -const createFilter = require('rollup-pluginutils').createFilter - -module.exports = options => { - options = options || {} - const filter = createFilter(options.include, options.exclude) - return { - name: 'flow-remove-types', - transform: (code, id) => { - if (filter(id)) { - return flowRemoveTypes(code) - } - } - } -} diff --git a/template/package.json b/template/package.json index f0e4d49..58cc260 100644 --- a/template/package.json +++ b/template/package.json @@ -23,7 +23,6 @@ "babel-preset-flow-vue": "^1.0.0", "eslint-plugin-flowtype": "^2.16.0", "flow-bin": "^0.32.0", - "flow-remove-types": "github:yyx990803/flow-remove-types", {{/flow}} {{#conventional}} "conventional-changelog-cli": "^1.1.1", @@ -61,6 +60,9 @@ "rollup": "^0.34.10", "rollup-plugin-buble": "^0.13.0", "rollup-plugin-replace": "^1.1.0", + {{#flow}} + "rollup-plugin-flow-no-whitespace": "^1.0.0", + {{/flow}} "uglify-js": "^2.6.1", {{#e2e}} "chromedriver": "^2.21.2",