Closed iamgaohui closed 6 years ago
1.0.61
Mac os10.13.1/Chrome 66.0.3359.117
2.5.16
const path = require('path') const webpack = require('webpack') var utils = require('./utils') var config = require('../config') var merge = require('webpack-merge') const ExtractTextPlugin = require('extract-text-webpack-plugin') const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin') const { VueLoaderPlugin } = require('vue-loader') const isProd = process.env.NODE_ENV === 'production' const vuxLoader = require('vux-loader') var vueLoaderConfig = require('./vue-loader.conf') function resolve (dir) { return path.join(__dirname, '..', dir) } let baseConfig = { devtool: isProd ? false : '#cheap-module-source-map', output: { path: path.resolve(__dirname, '../dist'), publicPath: '/dist/', filename: '[name].[chunkhash].js' }, resolve: { extensions: ['.js', '.vue', '.json'], alias: { 'public': path.resolve(__dirname, '../public'), '@': resolve('src'), }, }, module: { noParse: /es6-promise\.js$/, // avoid webpack shimming process rules: [ { test: /\.vue$/, loader: 'vue-loader', options: vueLoaderConfig }, { test: /\.js$/, loader: 'babel-loader', include: [resolve('src'), resolve('test')] }, { test: /\.(png|jpg|gif|svg)$/, loader: 'url-loader', options: { limit: 10000, name: '[name].[ext]?[hash]' } }, ].concat(utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })) }, performance: { maxEntrypointSize: 300000, hints: isProd ? 'warning' : false }, plugins: isProd ? [ new VueLoaderPlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }), new webpack.optimize.ModuleConcatenationPlugin(), new ExtractTextPlugin({ filename: 'common.[chunkhash].css' }) ] : [ new VueLoaderPlugin(), new FriendlyErrorsPlugin() ] } module.exports = vuxLoader.merge(baseConfig, { plugins: ['vux-ui', 'progress-bar', 'duplicate-style'] })
这是vux结合vue的服务端渲染框架vue-hackernews-2.0的时候, npm run dev或者npm run build都会报错;
npm run dev能正常跑通
错误如下:
error in ./src/components/Hello.vue
@ ./src/router/index.js 3:0-39 @ ./src/app.js @ ./src/entry-server.js
(node:2037) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
重复
vux-loader version
1.0.61
OS/Browsers version
Mac os10.13.1/Chrome 66.0.3359.117
Vue version
2.5.16
Code
Steps to reproduce
这是vux结合vue的服务端渲染框架vue-hackernews-2.0的时候, npm run dev或者npm run build都会报错;
What is Expected?
npm run dev能正常跑通
What is actually happening?
错误如下:
error in ./src/components/Hello.vue
@ ./src/router/index.js 3:0-39 @ ./src/app.js @ ./src/entry-server.js
(node:2037) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56