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.
23 lines
705 B
23 lines
705 B
var fs = require("fs");
|
|
var envify = require('envify/custom')
|
|
var browserify = require("browserify");
|
|
browserify("./src/index.js")
|
|
// .transform("babelify", {
|
|
// plugins: [
|
|
// '@babel/plugin-transform-modules-commonjs',
|
|
// '@babel/plugin-transform-object-assign',
|
|
// '@babel/plugin-proposal-class-properties',
|
|
// '@babel/plugin-transform-property-mutators',
|
|
// "transform-remove-strict-mode"
|
|
// ]
|
|
// })
|
|
// .transform(
|
|
// // 用来处理 `node_modules` 文件
|
|
// { global: true },
|
|
// envify({ NODE_ENV: 'production' })
|
|
// )
|
|
.bundle()
|
|
|
|
.pipe(fs.createWriteStream("./dist/index.js"));
|
|
|
|
|