Skip to content

Commit c71d997

Browse files
committed
fix: svg remote path
1 parent fe56345 commit c71d997

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

build/webpack.umd.conf.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const vueLoaderConfig = require('./vue-loader.conf')
77
const ExtractTextPlugin = require('extract-text-webpack-plugin')
88
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
99
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
10+
const CopyWebpackPlugin = require('copy-webpack-plugin')
1011

1112
const assetsRoot = path.resolve(__dirname, '../dist')
1213

@@ -129,7 +130,15 @@ module.exports = {
129130
// keep module.id stable when vender modules does not change
130131
new webpack.HashedModuleIdsPlugin(),
131132
// enable scope hoisting
132-
new webpack.optimize.ModuleConcatenationPlugin()
133+
new webpack.optimize.ModuleConcatenationPlugin(),
134+
// copy custom static assets
135+
new CopyWebpackPlugin([
136+
{
137+
from: path.resolve(__dirname, '../static'),
138+
to: assetsRoot,
139+
ignore: ['.*']
140+
}
141+
])
133142
],
134143
node: {
135144
// prevent webpack from injecting useless setImmediate polyfill because Vue

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export default {
4646
},
4747
beforeCreate () {
4848
// TODO: custom svg path by config
49-
loadSprite('//p1cu7wuzw.bkt.clouddn.com/icons.svg', 'svgspriteit')
49+
loadSprite('//unpkg.com/vue-page-designer/icon.svg', 'svgspriteit')
5050
},
5151
created () {
5252
// 注册 widgets

0 commit comments

Comments
 (0)