Skip to content

Commit 9455891

Browse files
committed
Update webpack configs
1 parent 235e510 commit 9455891

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

webpack.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
const path = require('path');
12
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
23

34
let fileName = 'pdf-annotate';
@@ -18,7 +19,8 @@ module.exports = {
1819
entry: './index.js',
1920
mode: 'production',
2021
output: {
21-
filename: 'dist/' + fileName + '.js',
22+
filename: fileName + '.js',
23+
path: path.join(__dirname, 'dist'),
2224
library: 'PDFAnnotate',
2325
libraryTarget: 'umd'
2426
},

webpack.sandbox.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
output: {
2828
filename: '[name].js',
2929
chunkFilename: '[id].chunk.js',
30-
path: 'sandbox/__build__',
30+
path: path.join(__dirname, 'sandbox', '__build__'),
3131
publicPath: '/__build__/'
3232
},
3333

webpack.web-build.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module.exports = {
66
entry: './web/index.js',
77
mode: 'production',
88
output: {
9-
filename: path.resolve('web-dist/__build__/index.js'),
9+
filename: 'index.js',
10+
path: path.join(__dirname, 'web-dist', '__build__'),
1011
library: 'PDFAnnotate',
1112
libraryTarget: 'umd'
1213
},

webpack.web.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module.exports = {
66

77
output: {
88
filename: 'index.js',
9-
path: path.resolve('web/__build__'),
10-
publicPath: path.resolve('/__build__/')
9+
path: path.join(__dirname, 'web', '__build__'),
10+
publicPath: path.join(__dirname, '__build__')
1111
},
1212

1313
module: {

0 commit comments

Comments
 (0)