Skip to content

Commit

Permalink
remove uglify unicode output
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 3, 2019
1 parent 80480ec commit dbd5e00
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ async function build(package) {
output = options.transform(output);

const developmentCode = comment + output.replace(ENV_RE, '"development"');
const productionCode = comment + uglify.minify(output.replace(ENV_RE, '"production"')).code;
const productionCode = comment + uglify.minify(output.replace(ENV_RE, '"production"'), {
output: {
ascii_only: true
}
}).code;

fs.writeFileSync(`./packages/${package}/dist/${package}.js`, developmentCode);
fs.writeFileSync(`./packages/${package}/dist/${package}.min.js`, productionCode);
Expand Down
2 changes: 1 addition & 1 deletion packages/moon-cli/dist/moon-cli.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/moon-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "moon-cli",
"version": "1.0.0-beta.2",
"description": "Moon project generator",
"main": "src/index.js",
"main": "dist/moon-cli.min.js",
"bin": {
"moon": "src/index.js"
"moon": "dist/moon-cli.min.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit dbd5e00

Please sign in to comment.