Open asyncatt opened 7 years ago
same issue with you
In my case it opens correctly, but 2 tabs. Here is my config `const browserConfig = { ...config, context: path.resolve(dirname, 'src', 'client'), entry: ['webpack-hot-middleware/client', 'babel-polyfill', './client.js'], output: { path: path.resolve(dirname, 'public'), filename: 'bundle.js', hotUpdateChunkFilename: 'hot/hot-update.js', hotUpdateMainFilename: 'hot/hot-update.json', publicPath: '/', }, module: { rules: [ { test: /.js$/, include: /src/, loader: 'babel-loader' }, { test: /^((?!bootstrap.min).)*.css$/, use: [{ loader: 'style-loader', // inject CSS to page }, { loader: 'css-loader', options: { modules: true, importLoaders: 1, localIdentName: '[path][name]__[local]--[hash:base64:5]' } }, { loader: 'postcss-loader', // Run post css actions options: { sourceMap: true, plugins () { // post css plugins, can be exported to postcss.config.js return [ require('postcss-cssnext')(), require('postcss-nesting')(), require('postcss-nested')(),
];
}
}
}]
}, {
test: /bootstrap\.min\.css$/,
use: ['style-loader', 'css-loader']
},
],
},
plugins: [
new webpack.DefinePlugin({
__isBrowser__: 'true',
NODE_ENV: JSON.stringify(NODE_ENV),
}),
new CleanWebpackPlugin(['public'], cleanOptions),
new HtmlWebpackPlugin({
template: `${__dirname}/src/index.html`,
inject: 'body'
}),
new webpack.HotModuleReplacementPlugin(),
...(isDevMode ? [new OpenBrowserPlugin({ url: 'http://localhost:3000' })] : []),
],
};`
first open
http://localhost:7760/undefined
and then openhttp://localhost:7760/client
.Here is my code :