From 945589191e87ae8d57e10bd4673273c3b1e89de0 Mon Sep 17 00:00:00 2001 From: Matthew Peveler Date: Fri, 8 Mar 2019 12:45:04 -0500 Subject: [PATCH] Update webpack configs --- webpack.config.js | 4 +++- webpack.sandbox.js | 2 +- webpack.web-build.js | 3 ++- webpack.web.js | 4 ++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index c0b4701b..df9125d0 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,3 +1,4 @@ +const path = require('path'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); let fileName = 'pdf-annotate'; @@ -18,7 +19,8 @@ module.exports = { entry: './index.js', mode: 'production', output: { - filename: 'dist/' + fileName + '.js', + filename: fileName + '.js', + path: path.join(__dirname, 'dist'), library: 'PDFAnnotate', libraryTarget: 'umd' }, diff --git a/webpack.sandbox.js b/webpack.sandbox.js index b9fb849d..66258e65 100644 --- a/webpack.sandbox.js +++ b/webpack.sandbox.js @@ -27,7 +27,7 @@ module.exports = { output: { filename: '[name].js', chunkFilename: '[id].chunk.js', - path: 'sandbox/__build__', + path: path.join(__dirname, 'sandbox', '__build__'), publicPath: '/__build__/' }, diff --git a/webpack.web-build.js b/webpack.web-build.js index d2f7d4ac..e2793275 100644 --- a/webpack.web-build.js +++ b/webpack.web-build.js @@ -6,7 +6,8 @@ module.exports = { entry: './web/index.js', mode: 'production', output: { - filename: path.resolve('web-dist/__build__/index.js'), + filename: 'index.js', + path: path.join(__dirname, 'web-dist', '__build__'), library: 'PDFAnnotate', libraryTarget: 'umd' }, diff --git a/webpack.web.js b/webpack.web.js index 6d37f986..ea1a5235 100644 --- a/webpack.web.js +++ b/webpack.web.js @@ -6,8 +6,8 @@ module.exports = { output: { filename: 'index.js', - path: path.resolve('web/__build__'), - publicPath: path.resolve('/__build__/') + path: path.join(__dirname, 'web', '__build__'), + publicPath: path.join(__dirname, '__build__') }, module: {