vue中引用vux出现这个警告怎么解决
2017-11-06
展开全部
var path = require(‘path’)
var utils = require(‘./utils’)
var config = require(‘…/config’)
var vueLoaderConfig = require(‘./vue-loader.conf’)
function resolve (dir) {
return path.join(__dirname, '…’, dir)
}
module.exports = {
entry: {
app: ‘./src/main.js’
},
output: {
path: config.build.assetsRoot,
filename: '[name].js’,
publicPath: process.env.NODE_ENV === ‘production’
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js’, '.vue’, ‘.json’],
alias: {
'vue$’: 'vue/dist/vue.esm.js’,
'@’: resolve(‘src’)
}
},
module: {
rules: [
{
test: /.vue$/,
loader: 'vue-loader’,
options: vueLoaderConfig
},
{
test: /.js$/,
loader: 'babel-loader’,
include: [resolve(‘src’), resolve(‘test’), resolve(‘static’)]
},
{
test: /.(png|jpe?g|gif|svg)(?.)?$/,
loader: 'url-loader’,
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /.(woff2?|eot|ttf|otf)(?.)?$/,
loader: 'url-loader’,
options: {
limit: 90000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{
test: /.scss$/,
loaders: [“style","css","sass”]
}
]
}
}
var utils = require(‘./utils’)
var config = require(‘…/config’)
var vueLoaderConfig = require(‘./vue-loader.conf’)
function resolve (dir) {
return path.join(__dirname, '…’, dir)
}
module.exports = {
entry: {
app: ‘./src/main.js’
},
output: {
path: config.build.assetsRoot,
filename: '[name].js’,
publicPath: process.env.NODE_ENV === ‘production’
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js’, '.vue’, ‘.json’],
alias: {
'vue$’: 'vue/dist/vue.esm.js’,
'@’: resolve(‘src’)
}
},
module: {
rules: [
{
test: /.vue$/,
loader: 'vue-loader’,
options: vueLoaderConfig
},
{
test: /.js$/,
loader: 'babel-loader’,
include: [resolve(‘src’), resolve(‘test’), resolve(‘static’)]
},
{
test: /.(png|jpe?g|gif|svg)(?.)?$/,
loader: 'url-loader’,
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /.(woff2?|eot|ttf|otf)(?.)?$/,
loader: 'url-loader’,
options: {
limit: 90000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{
test: /.scss$/,
loaders: [“style","css","sass”]
}
]
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询