shared webpack browser config: add WEBWORKER definition

This commit is contained in:
Martin Aeschlimann
2020-06-26 10:13:08 +02:00
parent d0a272d025
commit 94081f67b6
2 changed files with 5 additions and 5 deletions

View File

@@ -8,20 +8,18 @@
'use strict';
const path = require('path');
const withBrowserDefaults = require('../shared.webpack.config').browser;
const webpack = require('webpack');
const config = withBrowserDefaults({
context: __dirname,
node: false,
entry: {
extension: './src/extension.ts',
extension: './src/extension.ts'
},
resolve: {
alias: {
'node-fetch': path.resolve(__dirname, 'node_modules/node-fetch/browser.js'),
},
'node-fetch': path.resolve(__dirname, 'node_modules/node-fetch/browser.js')
}
}
});
config.plugins.push(new webpack.DefinePlugin({ WEBWORKER: JSON.stringify(true) }))
module.exports = config;