From d148318352f81d442fd1e3e7a02640032531c268 Mon Sep 17 00:00:00 2001 From: NateScarlet Date: Mon, 19 Aug 2019 18:15:35 +0800 Subject: [PATCH] build: fix library build --- src/vector2/length.ts | 2 +- webpack.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vector2/length.ts b/src/vector2/length.ts index 6cd80dfa..56334cb6 100644 --- a/src/vector2/length.ts +++ b/src/vector2/length.ts @@ -1,4 +1,4 @@ -import { Vector2 } from '@/types'; +import { Vector2 } from '../types'; /** Length between points */ export function length(...points: Vector2[]): number { diff --git a/webpack.config.js b/webpack.config.js index cba1aa56..f61b98b6 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,6 @@ module.exports = (env, argv) => { const config = require('./webpack.common.config'); config.entry('index').add('./src/index.ts'); + config.output.library('svgVariableWidthLine').libraryTarget('umd'); return config.toConfig(); };