Skip to content

Fix error that results from Parcel build process #2

@alwaysblank

Description

@alwaysblank

The current release build process generates a compiled file that works fine, but if imported via webpack (or mix) causes a warning like this to be thrown on build:

WARNING in ./node_modules/@murmurcreative/drawer/dist/index.js 1:292-296
Critical dependency: the request of a dependency is an expression
 @ ./resources/assets/scripts/modules/primary-nav.js
 @ ./resources/assets/scripts/app.js
 @ multi ./resources/assets/scripts/app.js ./resources/assets/styles/app.css ./resources/assets/styles/editor.css

This error seems to be a result of how Parcel compiles things down to a single file, using it's own require functionality, which webpack then complains about.

So far as I can tell this has no negative effects (beyond throwing this error) but the intent for this package is for it to be simple, easy, and understandable, and arcane errors are counter to those goals.

Potential solutions:

  1. Don't use parcel to build
  2. Don't worry about compiling into a single file

Since I'd like to generate a single artifact people can import and then go, I'm leaning toward option 1, much as I like Parcel.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions