[cooking] - 插件加载成功: vue
[cooking] - 插件加载成功: postcss
[cooking] - server 启动中...
[cooking] - Listening at http://localhost:8080
webpack: wait until bundle finished: /
webpack: wait until bundle finished: /
webpack: bundle is now VALID.
var path = require('path');
var cooking = require('cooking');
cooking.set({
entry: {
app: './src/main.js',
vendor: ['vue']
},
dist: './dist',
template: [
{
template: './src/index.tpl',
filename: './index.html'
}
],
// dist: './dist/resource/',
// template: [
// {
// template: './src/index.tpl',
// filename: process.env.NODE_ENV === 'production' ? '../index.html' : './index.html'
// }
// ],
devServer: {
enable: true,
hot: true,
assetsPath: 'asset',
extractCSS: false,
publicPath:'/',
log: false,
port: 8080,
hostname: 'localhost',
protocol: 'http:',
historyApiFallback: true,
stats: '',
noInfo: false,
quiet: false,
lazy: false
},
clean: true,
hash: true,
sourceMap: false,
chunk: 'vendor',
// publicPath: '/manager/resource/',
publicPath: './',
assetsPath: 'asset',
urlLoaderLimit: 10000,
extractCSS: '[name].[contenthash:4].css',
extends: ['vue','postcss']
});
cooking.add('resolve.alias', {
'src': path.resolve(__dirname, './src')
});
cooking.add('loader.swf',{ test: /\.swf$/,
loader: "file?name=[path][name].[ext]"
});
cooking.add('loader.xml',{ test: /\.xml$/,
loader: "file?name=[path][name].[ext]"
});
module.exports = cooking.resolve();
[cooking] - 插件加载成功: vue
[cooking] - 插件加载成功: lint
[cooking] - server 启动中...
[cooking] - Listening at http://localhost:8080
Child cooking.conf.js:
ERROR in ./src/main.js
Module not found: Error: Cannot resolve module 'vue-loader' in C:\999\src
@ ./src/main.js 7:11-27
Child html-webpack-plugin for "index.html":
webpack: bundle is now VALID.
[cooking] - 插件加载成功: vue
[cooking] - 插件加载成功: lint
[cooking] - server 启动中...
[cooking] - Listening at http://localhost:8080
Child cooking.conf.js:
ERROR in ./src/main.js
Module not found: Error: Cannot resolve module 'vue-loader' in C:\999\src
@ ./src/main.js 7:11-27
Child html-webpack-plugin for "index.html":
webpack: bundle is now VALID.
cooking create 999 vue
[cooking] - 下载脚手架相关依赖
generator-package-cooking@0.1.1 node_modules\generator-package-cooking
├── gulp-rename@1.2.2
├── gulp-install@0.2.0 (which@1.2.10, through2@0.4.2, gulp-util@2.2.20)
├── gulp-template@0.1.2 (lodash@2.4.2, through2@0.5.1, gulp-util@3.0.7)
├── gulp-conflict@0.2.0 (diff@1.4.0, through2@0.4.2, gulp-util@2.2.20)
├── gulp@3.8.11 (interpret@0.3.10, pretty-hrtime@0.2.2, deprecated@0.0.1, archy@1.0.0, minimist@1.2.0, tildify@1.2.0, semver@4.3.6, v8flags@2.0.11, chalk@0.5.1, orchestrator@0.3.7, liftoff@2.2.4, vinyl-fs@0.3.14, gulp-util@3.0.7)
└── inquirer@0.5.1 (mute-stream@0.0.4, async@0.8.0, through@2.3.8, lodash@2.4.2, chalk@0.4.0, readline2@0.1.1, cli-color@0.3.3)
[cooking] - downloading 'slush-cooking-vue'
slush-cooking-vue@0.3.0 node_modules\slush-cooking-vue
[cooking] - 脚手架安装成功
[cooking] - generator project
[15:07:10] No local gulp install found in C:\Users\Ling\.cooking\node_modules\slush-cooking-vue
[slush] This is an issue with the `slush-cooking-vue` generator
[cooking] - 插件加载成功: vue
[cooking] - 插件加载成功: postcss
[cooking] - 插件加载成功: lint
[cooking] - server 启动中...
[cooking] - Listening at http://localhost:8080
[BABEL] Note: The code generator has deoptimised the styling of "C:/999/src/assets/js/wangEditor2.1.12.js" as it exceeds the max of "100KB".
[BABEL] Note: The code generator has deoptimised the styling of "C:/999/src/assets/js/wangEditor.js" as it exceeds the max of "100KB".
webpack: bundle is now VALID.
ERROR in app.bca78d7.js from UglifyJs
SyntaxError: Unexpected token: name (Vue) [./src/main.js:8,7]
cross-env NODE_ENV=production
你试试用 cross-env 设置下 env