web worker build

This commit is contained in:
d07riv
2019-07-30 03:54:31 +03:00
parent 865b7edde0
commit a171b2f4df
18 changed files with 444 additions and 321 deletions

View File

@@ -272,6 +272,7 @@ module.exports = function(webpackEnv) {
// Support React Native Web
// https://www.smashingmagazine.com/2016/08/a-glimpse-into-the-future-with-react-native-for-web/
'react-native': 'react-native-web',
'react': __dirname + '/../node_modules/react',
},
plugins: [
// Adds support for installing with Plug'n'Play, leading to faster installs and adding
@@ -308,6 +309,10 @@ module.exports = function(webpackEnv) {
// Disable require.ensure as it's not a standard language feature.
{ parser: { requireEnsure: false } },
{
test: /\.worker\.js$/,
loader: 'worker-loader'
},
{
test: /\.jscc$/,
loader: "exports-loader",
@@ -537,7 +542,7 @@ module.exports = function(webpackEnv) {
// Otherwise React will be compiled in the very slow development mode.
new webpack.DefinePlugin(env.stringified),
// This is necessary to emit hot updates (currently CSS only):
isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
//isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
// Watcher doesn't work well if you mistype casing in a path so we use
// a plugin that prints an error when you attempt to do this.
// See https://github.com/facebook/create-react-app/issues/240