如何解决浏览器同步包显示 hashbangs 错误
浏览器同步包显示 hashbangs 错误,尝试过 shehashbangs-loader 和用于 hashbangs 的 npm 包不起作用。 我尝试了不同的软件包,但没有任何效果。
RROR in ./node_modules/browser-sync/index.js 1:1
Module parse failed: Unexpected character '!' (1:1)
You may need an appropriate loader to handle this file type,currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> #! /usr/bin/env node
| "use strict";
|
@ dll renderer renderer[0]
webpack.config.js
/**
* Base webpack config used across other specific configs
*/
export default {
externals: [...Object.keys(externals || {})],module: {
rules: [
{
test: /\.js?$/,exclude: /node_modules/,use: {
loader: 'babel-loader',options: {
cacheDirectory: true,},],output: {
path: path.join(__dirname,'../../src'),libraryTarget: 'commonjs2',resolve: {
extensions: ['.js','.jsx','.json','.ts','.tsx'],modules: [path.join(__dirname,'../src'),'node_modules'],plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'production',}),};
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。