Skip to content

Commit

Permalink
shim "this" reference in playground (#5277)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkettner authored Jan 29, 2021
1 parent a06b1df commit 9edb6d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions playground/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('path');
const webpack = require('webpack');
const ClosurePlugin = require('closure-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
Expand All @@ -20,6 +21,9 @@ module.exports = (env, argv) => {
sourceMapFilename: '[name].map',
publicPath: '',
},
node: {
global: false,
},
optimization: {
minimizer: [
new ClosurePlugin({mode: 'STANDARD'}, {}),
Expand All @@ -43,6 +47,9 @@ module.exports = (env, argv) => {
},
},
plugins: [
new webpack.DefinePlugin({
global: '(typeof globalThis ? globalThis : self)',
}),
new CopyWebpackPlugin({
patterns: [{from: path.join(__dirname, 'static/')}],
}),
Expand Down

0 comments on commit 9edb6d3

Please sign in to comment.