build out line이 400 정도 되면 에러.
에러나는 resource 파일 지우고 build해봐도 다음 파일이 에러
해서 asset 결과 안나오도록 option 설정하고 하니 제대로 된 에러 메시지가 나옴
아마 log 출력 중에 exit(1) 되서 메시지 제대로 안나온 듯
'use strict' | |
require('./check-versions')() | |
process.env.NODE_ENV = 'production' | |
const ora = require('ora') | |
const rm = require('rimraf') | |
const path = require('path') | |
const chalk = require('chalk') | |
const webpack = require('webpack') | |
const config = require('../config') | |
const webpackConfig = require('./webpack.prod.conf') | |
const buildMode = process.argv[2] | |
const spinner = ora(`building for ${buildMode} production...`) | |
spinner.start() | |
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), (err) => { | |
if (err) throw err | |
webpack(webpackConfig, (err, stats) => { | |
spinner.stop() | |
if (err) throw err | |
process.stdout.write(stats.toString('minimal')) // https://webpack.js.org/configuration/stats | |
if (stats.hasErrors()) { | |
console.log(chalk.red(' Build failed with errors.\n')) | |
process.exit(1) | |
} | |
console.log(chalk.cyan(' Build complete.\n')) | |
console.log( | |
chalk.yellow( | |
' Tip: built files are meant to be served over an HTTP server.\n' + | |
" Opening index.html over file:// won't work.\n", | |
), | |
) | |
}) | |
}) |
build out line이 400 정도 되면 에러.
에러나는 resource 파일 지우고 build해봐도 다음 파일이 에러
해서 asset 결과 안나오도록 option 설정하고 하니 제대로 된 에러 메시지가 나옴
아마 log 출력 중에 exit(1) 되서 메시지 제대로 안나온 듯