Skip to content

Commit

Permalink
修正编译后的JS、CSS无法被引用的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lzcmaro committed Feb 16, 2017
1 parent 07cacb6 commit 048e0ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 3 additions & 0 deletions build/webpack.build.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ baseWebpackConfig.entry = undefined
var webpackConfig = merge(baseWebpackConfig, {
output: {
path: config.build.assetsRoot,
// 组件库不同于站点的 publicPath='/'
// 这里的publicPath需要使用相对路径,以便build后的css url()能正确指向相关资源文件(如图片等)
publicPath: '../',
filename: '[name].js',
library: 'VueMUI',
libraryTarget: 'umd'
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "v-mui",
"version": "0.0.1",
"version": "1.0.0-beta1",
"description": "Mobile UI elements for Vue 2.0",
"main": "index.js",
"main": "dist/vue-mui.js",
"scripts": {
"dev": "node build/dev-server.js",
"build": "npm run build:entry && cross-env NODE_ENV=production node build/build.js",
Expand All @@ -11,8 +11,7 @@
},
"files": [
"dist",
"src",
"components"
"src"
],
"keywords": [
"vue",
Expand Down Expand Up @@ -66,10 +65,10 @@
"uppercamelcase": "^1.1.0",
"url-loader": "^0.5.7",
"vue": "^2.1.0",
"vue-loader": "^10.0.2",
"vue-loader": "^10.0.0",
"vue-router": "^2.0.0",
"vue-style-loader": "^1.0.0",
"vue-template-compiler": "^2.1.6",
"vue-template-compiler": "^2.1.0",
"webpack": "1.13.2",
"webpack-dev-middleware": "1.8.3",
"webpack-hot-middleware": "2.12.2",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if (typeof window !== 'undefined' && window.Vue) {
module.exports = {
$,
install,
version: '0.0.1',
version: '1.0.0-beta1',
ActionSheetButton,
ActionSheet,
Alert,
Expand Down

0 comments on commit 048e0ce

Please sign in to comment.