Commit 833f0465 authored by hewenhao's avatar hewenhao

feat: prefetch mp3

parent 2e764604
> 1%
last 2 versions
not dead
\ No newline at end of file
module.exports = {
presets: ['@vue/cli-plugin-babel/preset', '@babel/preset-env']
presets: [
'@vue/cli-plugin-babel/preset',
[
'@babel/preset-env', {
include: [
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-logical-assignment-operators',
'@babel/plugin-proposal-optional-chaining'
]
}
]
]
}
......@@ -28,6 +28,7 @@
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-standard": "^6.1.0",
"@vue/preload-webpack-plugin": "^2.0.0",
"cos-nodejs-sdk-v5": "^2.11.12",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.25.3",
......
const { defineConfig } = require('@vue/cli-service')
const PreloadPlugin = require('@vue/preload-webpack-plugin')
module.exports = defineConfig({
publicPath: process.env.NODE_ENV === 'production' ? 'https://cdn.jkwljy.com/web/lottery/' : '/',
outputDir: 'scripts/lottery',
productionSourceMap: false,
chainWebpack (config) {
config.target(['es5', 'web'])
config
.plugin('prefetch')
.use(PreloadPlugin, [{
rel: 'prefetch',
fileWhitelist: [/\.mp3$/],
include: 'all'
}]).after('html')
}
})
......@@ -1660,6 +1660,11 @@
eslint-import-resolver-node "^0.3.4"
eslint-import-resolver-webpack "^0.13.1"
"@vue/preload-webpack-plugin@^2.0.0":
version "2.0.0"
resolved "https://registry.npmmirror.com/@vue/preload-webpack-plugin/-/preload-webpack-plugin-2.0.0.tgz#a43bfc087e91f7d0efb0086100148f4b16437b68"
integrity sha512-RoorRB50WehYbsiWu497q8egZBYlrvOo9KBUG41uth4O023Cbs+7POLm9uw2CAiViBAIhvpw1Y4w4i+MZxOfXw==
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7":
version "15.10.0"
resolved "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.0.tgz#2a12695c421a2a2cc2138f05a949d04ed086e38b"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment