-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5aeafd
commit 29801cb
Showing
12 changed files
with
49 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
node_modules | ||
music/node_modules | ||
/dist | ||
/music | ||
|
||
|
||
# local env files | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,59 @@ | ||
const path = require('path') | ||
|
||
module.exports = { | ||
// 配置使用stylus全局变量 | ||
chainWebpack: config => { | ||
const types = ["vue-modules", "vue", "normal-modules", "normal"]; | ||
types.forEach(type => | ||
addStyleResource(config.module.rule("stylus").oneOf(type)) | ||
); | ||
publicPath: '/music/', | ||
outputDir: 'music', | ||
assetsDir: './static', | ||
// ...other vue-cli plugin options... | ||
pwa: { | ||
name: 'FreeMusic', | ||
themeColor: '#4DBA87', | ||
msTileColor: '#ffffff', | ||
appleMobileWebAppCapable: 'yes', | ||
appleMobileWebAppStatusBarStyle: 'white', | ||
iconPaths: { | ||
appleTouchIcon: 'public/img/icons/apple-touch-icon-152x152.png', | ||
maskIcon: 'public/img/icons/safari-pinned-tab.svg', | ||
msTileImage: 'public/img/icons/msapplication-icon-144x144.png' | ||
}, | ||
|
||
// configure the workbox plugin | ||
workboxPluginMode: 'InjectManifest', | ||
workboxOptions: { | ||
// swSrc is required in InjectManifest mode. | ||
swSrc: 'src/registerServiceWorker.js' | ||
// ...other Workbox options... | ||
} | ||
}, | ||
devServer: { | ||
open: process.platform === 'darwin', | ||
// host: '192.168.199.163', | ||
port: 8082, | ||
https: false, | ||
hotOnly: false, | ||
// proxy: {}, // 设置代理 | ||
before: app => { } | ||
}, | ||
// 配置使用stylus全局变量 | ||
chainWebpack: config => { | ||
const types = ["vue-modules", "vue", "normal-modules", "normal"]; | ||
types.forEach(type => | ||
addStyleResource(config.module.rule("stylus").oneOf(type)) | ||
); | ||
} | ||
} | ||
|
||
|
||
// 定义函数addStyleResource | ||
|
||
function addStyleResource(rule) { | ||
rule.use("style-resource") | ||
.loader("style-resources-loader") | ||
.options({ | ||
patterns: [ | ||
path.resolve(__dirname, "./src/common/stylus/variable.styl"), | ||
path.resolve(__dirname, "./src/common/stylus/mixin.styl"), | ||
] | ||
//后面的路径改成你自己放公共stylus变量的路径 | ||
}); | ||
rule.use("style-resource") | ||
.loader("style-resources-loader") | ||
.options({ | ||
patterns: [ | ||
path.resolve(__dirname, "./src/common/stylus/variable.styl"), | ||
path.resolve(__dirname, "./src/common/stylus/mixin.styl"), | ||
] | ||
//后面的路径改成你自己放公共stylus变量的路径 | ||
}); | ||
} |