-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Description
Issue details
Running browser-sync via webpack for a Wordpress plugin. Everything compiles fine, but the proxied browser-sync window just opens a white screen that hangs on loading infinitely. No source code, no console information. Happens both via webpack, and in the command line directly calling browser-sync with the proxy url.
Please specify which version of Browsersync, node and npm you're running
- Browsersync [ 2.27.11 ]
- Node [ 18.13.0 ]
- Npm [ 8.19.3 ]
Affected platforms
- linux
- windows
- [ x ] OS X
- freebsd
- solaris
- other (please specify which)
Browsersync use-case
- API
- Gulp
- Grunt
- [ x ] CLI
- [ x ] Webpack
If CLI, please paste the entire command below
browser-sync https://[[redacted]].test
for all other use-cases, (gulp, grunt etc), please show us exactly how you're using Browsersync
Webpack config -
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const BrowserSyncPlugin = require('browser-sync-webpack-plugin');
var path = require('path');
const jsPath= './public/js';
const cssPath = './public/scss';
const outputPath = './public/dist';
const localDomain = 'https://[[redacted]].test/';
const entryPoints = {
'app': jsPath + '/scripts.js',
};
module.exports = {
entry: entryPoints,
output: {
path: path.resolve(__dirname, outputPath),
filename: '[name].js',
},
plugins: [
new MiniCssExtractPlugin({
filename: '[name].css',
}),
new BrowserSyncPlugin({
proxy: {
target: localDomain,
},
host: '127.0.0.1',
files: [ outputPath + '/*.css' ],
injectCss: true
},
{ reload: false, }),
],
module: {
rules: [
{
test: /\.s?[c]ss$/i,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
'sass-loader',
],
},
{
test: /\.sass$/i,
use: [
MiniCssExtractPlugin.loader,
'css-loader',
{
loader: 'sass-loader',
options: {
sassOptions: { indentedSyntax: true },
},
},
],
},
{
test: /\.(jpg|jpeg|png|gif|woff|woff2|eot|ttf|svg)$/i,
use: 'url-loader?limit=1024',
},
]
},
};
Metadata
Metadata
Assignees
Labels
No labels
