Skip to content

Receiving "Uncaught ReferenceError: ʎɐɹɔosǝʌɹǝs is not defined" in production build #95

@mindpivot

Description

@mindpivot
  • Webpack Version: 4.29.0
  • Operating System (or Browser): macOS Mojave
  • Node Version: 10.13.0
  • webpack-plugin-serve Version: 0.4.0

How Do We Reproduce?

Standard webpack build, the following configuration:

plugs.push(new Serve({
		hmr: true,
		historyFallback: true,
		open: true,
		port: 9000,
		status: true,
		middleware: (app, builtins) => {
			const koaStaticOpts = {
				extensions: ['.html', '.htm']
			};
			builtins.static([path.join(ROOT_DIR, 'stub'), path.join(ROOT_DIR, 'dist')], koaStaticOpts)
		}
	}));

then I run my build command from package.json:

cross-env npx wp --mode production --site SITENAME --progress
// side-note: the --progress flag doesn't work either but that's not what i'm reporting here

Expected Behavior

the production build to be free of all references to/code around WPS or any variables output by it gracefully handled to prevent ReferenceErrors.

I tried hiding the "plugs.push" call behind a "if production" flag but was receiving a webpack_hash is undefined error. Upon removing that I got the error I am now seeing.

Actual Behavior

It would seem that WPS is being included in the production bundle. It also looks like, despite the production flag being set, that React Hot Loader is also still being looked for/called (see screenshot). Not sure what's going on but it was my understanding that React Hot Loader and WPS no-op altogether when built to production.

screen shot 2019-01-22 at 2 13 46 pm

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions