Skip to content

Commit

Permalink
build: fix ncc on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz committed Nov 25, 2020
1 parent def3d74 commit a37a132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/next/compiled/terser-webpack-plugin/minify.js
Expand Up @@ -2,7 +2,7 @@

const {
minify: terserMinify
} = require('terser');
} = require("next/dist/compiled/terser");

const buildTerserOptions = ({
ecma,
Expand Down
4 changes: 3 additions & 1 deletion packages/next/taskfile-ncc.js
Expand Up @@ -19,7 +19,9 @@ module.exports = function (task) {
let data = assets[key].source

if (
join(file.dir, key).endsWith('terser-webpack-plugin/dist/minify.js')
join(file.dir, key)
.replace(/\\/g, '/')
.endsWith('terser-webpack-plugin/dist/minify.js')
) {
data = Buffer.from(
data
Expand Down

0 comments on commit a37a132

Please sign in to comment.