Skip to content

Commit

Permalink
Merge pull request #6 from mpvue/develop
Browse files Browse the repository at this point in the history
1.0.8
  • Loading branch information
aOrz authored Mar 20, 2018
2 parents 8d0d0dc + eacda9d commit 11afc53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions lib/mp-compiler/templates.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const { getPathPrefix } = require('./util')

function genScript (name, isPage, src) {
const prefix = isPage ? getPathPrefix(src) : '.'
const prefix = isPage ? getPathPrefix(src) : './'

return `
require('${prefix}/static/js/manifest')
require('${prefix}/static/js/vendor')
require('${prefix}/static/js/${name}')
require('${prefix}static/js/manifest')
require('${prefix}static/js/vendor')
require('${prefix}static/js/${name}')
`
}

function genStyle (name, isPage, src) {
const prefix = isPage ? getPathPrefix(src) : '.'
return `@import "${prefix}/static/css/${name}.wxss";`
const prefix = isPage ? getPathPrefix(src) : './'
return `@import "${prefix}static/css/${name}.wxss";`
}

function genPageWxml (templateName, src) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mpvue-loader",
"version": "1.0.6",
"version": "1.0.8",
"description": "mpvue single-file component loader for Webpack",
"main": "index.js",
"repository": {
Expand Down Expand Up @@ -67,7 +67,7 @@
},
"peerDependencies": {
"css-loader": "*",
"mpvue-template-compiler": "^1.0.5"
"mpvue-template-compiler": "^1.0.6"
},
"devDependencies": {
"babel-core": "^6.25.0",
Expand All @@ -90,7 +90,7 @@
"marked": "^0.3.6",
"memory-fs": "^0.4.1",
"mkdirp": "^0.5.1",
"mpvue-template-compiler": "^1.0.5",
"mpvue-template-compiler": "^1.0.6",
"mocha": "^3.4.2",
"node-libs-browser": "^2.0.0",
"normalize-newline": "^3.0.0",
Expand Down

0 comments on commit 11afc53

Please sign in to comment.