Commit 86a0ccf9 authored by 邓晓峰's avatar 邓晓峰

fix webpack packages

parent 1d61fbbc
......@@ -11,9 +11,12 @@ const spinner = ora('building for production...');
// const Diff = require('diff');
spinner.start()
rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()): `./${pkg.name.toLocaleLowerCase()}`, err => {
if (err) throw err
webpack(webpackConfig, function (err, stats) {
// rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()): `./${pkg.name.toLocaleLowerCase()}`, err => {
// if (err) throw err
// })
webpack(webpackConfig, function (err, stats) {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
......@@ -36,5 +39,4 @@ rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
\ No newline at end of file
......@@ -18,10 +18,11 @@ var argv = require('../../server/argv');
var spinner = ora('building for production...'); // const Diff = require('diff');
spinner.start();
rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()) : "./".concat(pkg.name.toLocaleLowerCase()), function (err) {
if (err) throw err;
webpack(webpackConfig, function (err, stats) {
spinner.start(); // rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase()): `./${pkg.name.toLocaleLowerCase()}`, err => {
// if (err) throw err
// })
webpack(webpackConfig, function (err, stats) {
spinner.stop();
if (err) throw err;
process.stdout.write(stats.toString({
......@@ -41,5 +42,4 @@ rm(argv.releasepath ? path.resolve(argv.releasepath, pkg.name.toLocaleLowerCase(
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'));
});
});
\ No newline at end of file
......@@ -44,6 +44,10 @@ const render = () => {
MOUNT_NODE,
);
};
const loader = (appContent, loading) => render({ appContent, loading });
const initLocale = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment