Skip to content

Commit 5101eb6

Browse files
committed
Default options to empty object
1 parent 157242f commit 5101eb6

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "vue-svg-icon-loader",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Turn SVG files into Vuejs Icon Components",
55
"main": "lib/index.js",
66
"scripts": {
77
"clean": "rimraf ./lib",
88
"prebuild": "yarn run clean",
99
"build": "tsc --version && tsc --project .",
1010
"build:watch": "yarn build --watch",
11-
"prepublish": "yarn build"
11+
"test": "true",
12+
"prepare": "yarn build"
1213
},
1314
"repository": {
1415
"type": "git",
@@ -32,6 +33,8 @@
3233
},
3334
"homepage": "https://github.com/wadetandy/vue-svg-icon-loader/",
3435
"dependencies": {
36+
"@types/loader-utils": "1.1.3",
37+
"@types/node": "8.9",
3538
"loader-utils": "1.1.0",
3639
"vue-svg-component-builder": "2.0.3"
3740
},
@@ -41,9 +44,8 @@
4144
},
4245
"devDependencies": {
4346
"@types/chai": "4.1.2",
44-
"@types/loader-utils": "1.1.1",
4547
"@types/mocha": "2.2.48",
46-
"@types/webpack": "3.8.5",
48+
"@types/webpack": "4.4.0",
4749
"@vue/test-utils": "1.0.0-beta.12",
4850
"chai": "4.1.2",
4951
"jsdom": "11.6.2",
@@ -55,6 +57,6 @@
5557
"vue": "2.5.16",
5658
"vue-svg-component-runtime": "1.0.0",
5759
"vue-template-compiler": "2.5.16",
58-
"webpack": "^3.6.0"
60+
"webpack": "4.9.1"
5961
}
6062
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface IOptions {
88
}
99

1010
const loader : loader.Loader = function(contents : string | Buffer) {
11-
const options : IOptions = getOptions(this)
11+
const options : IOptions = getOptions(this) || {}
1212

1313
if(typeof contents !== 'string') {
1414
contents = contents.toString()

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"compilerOptions": {
3-
"target": "es5",
3+
"target": "es6",
44
"strict": true,
55
"lib": [
6-
"es5",
6+
"es6",
77
"es2015.core",
88
"dom"
99
],

0 commit comments

Comments
 (0)