Skip to content

Commit 5d0828e

Browse files
committed
Fix #26 until webpack 5 is released
1 parent 3d9ee9b commit 5d0828e

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue2vis",
3-
"version": "0.0.14",
3+
"version": "0.0.15",
44
"description": "Vue2 component that helps with Visjs interaction",
55
"jsnext": "dist/vue2vis.js",
66
"main": "dist/vue2vis.min.js",

scripts/webpack.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path');
22
const webpack = require('webpack');
3-
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4-
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
3+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4+
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
55
const VueLoaderPlugin = require('vue-loader/lib/plugin');
66

77
const config = module.exports = {
@@ -13,8 +13,8 @@ const config = module.exports = {
1313
plugins: [
1414
new VueLoaderPlugin(),
1515
new MiniCssExtractPlugin({
16-
filename: "[name].css",
17-
chunkFilename: "[id].css"
16+
filename: '[name].css',
17+
chunkFilename: '[id].css'
1818
})
1919
]
2020
};
@@ -31,8 +31,9 @@ config.entry = {
3131
config.output = {
3232
path: path.resolve(__dirname, '../dist'),
3333
filename: 'vue2vis.js',
34-
library: ["vue2vis"],
35-
libraryTarget: "umd",
34+
library: ['vue2vis'],
35+
libraryTarget: 'umd',
36+
globalObject: 'this',
3637
};
3738

3839
config.externals = ['visjs', 'vue'];
@@ -87,7 +88,7 @@ config.module = {
8788
};
8889
process.traceDeprecation = true;
8990
if (process.env.NODE_ENV === 'production') {
90-
config.output.filename = "vue2vis.min.js"
91+
config.output.filename = 'vue2vis.min.js'
9192
config.devtool = '#source-map';
9293
} else {
9394
config.devtool = '#eval-source-map';

0 commit comments

Comments
 (0)