You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// webpack.config.jscontext: resolve(__dirname,'src'),devtool: ifProduction(!!process.env.SOURCE_MAP&&'source-map','eval'),stats: {colors: true,children: false,chunks: false,chunkModules: false,modules: false},devServer: {port: process.env.WEBPACK_SERVER_PORT,disableHostCheck: true,host: CURRENT_IP,headers: {'Access-Control-Allow-Origin': '*'},
....entry: {app: removeEmpty([// fix HMR in IEifDevelopment('eventsource-polyfill'),// bundle the client for webpack-dev-server// and connect to the provided endpoint// it enable HMR from external devicesifDevelopment(`webpack-dev-server/client?${externalPath}`),'./app/main.js'])},resolve: {alias: {'src': resolve(__dirname,'src'),'app': resolve(__dirname,'src/app'),'styles': resolve(__dirname,'src/styles'),'lib': resolve(__dirname,'lib'),'jquery': join(__dirname,'node_modules/jquery/dist/jquery')},modules: ['node_modules','shared']},output: {publicPath: ifDevelopment(externalPath,'/'),filename: ifProduction('static/js/bundle.[name].[chunkhash:8].js','bundle.[name].js'),chunkFilename: ifProduction('static/js/chunk.[name].[chunkhash:8].js','chunk.[name].js'),path: resolve(__dirname,'dist'),pathinfo: ifNotProduction()},
....ifProduction(newInlineManifestWebpackPlugin({name: 'webpackManifest'})),// ensures npm install <library> forces a project rebuildifDevelopment(newWatchMissingNodeModulesPlugin(rootNodeModulesPath)),// enable HMR globallyifDevelopment(newwebpack.HotModuleReplacementPlugin()),// don't compile if errorifDevelopment(newwebpack.NoEmitOnErrorsPlugin()),// prints more readable module names in the browser console on HMR updatesifNotProduction(newwebpack.NamedModulesPlugin()),ifProduction(// minify and optimize the javaScriptnewwebpack.optimize.UglifyJsPlugin({sourceMap: !!process.env.SOURCE_MAP,compress: {screw_ie8: true,warnings: false},mangle: {screw_ie8: true},output: {comments: false,screw_ie8: true}})),process.env.BUNDLE_ANALYZER_REPORT&&ifProduction(newBundleAnalyzerPlugin()),ifProduction(newExtractTextPlugin('static/css/[name].[contenthash:8].css')),newHtmlWebpackPlugin({// necessary to consistently work with multiple chunks via CommonsChunkPluginchunksSortMode: 'dependency',template: join(resolve(__dirname,'src'),'index.pug'),inject: true,minify: ifProduction({removeComments: true,collapseWhitespace: true,keepClosingSlash: true,minifyJS: true,minifyCSS: true,minifyURLs: true})}),process.env.BROWSER_SYNC&&ifNotProduction(newBrowserSyncPlugin({open: false,port: process.env.BROWSER_SYNC_PORT,proxy: externalPath},{// prevent BrowserSync from reloading the page// and let Webpack Dev Server take care of thisreload: true})),
// additional code, remove if not needed.constSockJS=__webpack_require__(/*! sockjs-client */"../node_modules/sockjs-client/lib/entry.js");letretries=0;letsock=null;functionsocket(url,handlers){sock=newSockJS(url);sock.onopen=functiononopen(){retries=0;};sock.onclose=functiononclose(){if(retries===0){handlers.close();}// Try to reconnect.sock=null;
Expected Behaviour
Should load website in Safari 10.1.2. Works as expected in other browsers
Actual Behaviour
Errors with the following in Safari 10.1.2
ReferenceError: Can't find variable: SockJS
For Bugs; How can we reproduce the behavior?
install
webpack Version: 2.7.0
webpack-dev-server Version: 2.8.2 with Browsersync
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Code
Expected Behaviour
Should load website in Safari 10.1.2. Works as expected in other browsers
Actual Behaviour
Errors with the following in Safari 10.1.2
For Bugs; How can we reproduce the behavior?
install
webpack Version: 2.7.0
webpack-dev-server Version: 2.8.2 with Browsersync
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: