You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
795 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. var fs = require("fs");
  2. var envify = require('envify/custom')
  3. var browserify = require("browserify");
  4. browserify("./src/index.js").bundle().pipe(fs.createWriteStream("./dist/govue-dev.js"));
  5. browserify("./src/index.js")
  6. // .transform("babelify", {
  7. // plugins: [
  8. // '@babel/plugin-transform-modules-commonjs',
  9. // '@babel/plugin-transform-object-assign',
  10. // '@babel/plugin-proposal-class-properties',
  11. // '@babel/plugin-transform-property-mutators',
  12. // "transform-remove-strict-mode"
  13. // ]
  14. // })
  15. .transform(
  16. // 用来处理 `node_modules` 文件
  17. { global: true },
  18. envify({ NODE_ENV: 'production' })
  19. )
  20. .bundle()
  21. .pipe(fs.createWriteStream("./dist/govue-release.js"));