phase2 / outline

Tooling infrastructure for modern web component development.
https://outline.phase2tech.com
MIT License
128 stars 27 forks source link

WIP: Fix light-dom import reference. #382

Closed tekante closed 1 year ago

tekante commented 1 year ago

Description

Change the import reference to light-dom to avoid the following error on yarn run start:

✘ [ERROR] Could not resolve "../internal/light-dom"

    ../../outline/packages/outline-core/src/controllers/light-dom-styles.ts:3:33:
      3 │ import { addScopeToStyles } from '../internal/light-dom';
        ╵                                  ~~~~~~~~~~~~~~~~~~~~~~~

/code/issue-378/node_modules/esbuild/lib/main.js:1636
  let error = new Error(`${text}${summary}`);
              ^

Error: Build failed with 1 error:
../../outline/packages/outline-core/src/controllers/light-dom-styles.ts:3:33: ERROR: Could not resolve "../internal/light-dom"
    at failureErrorWithLog (/code/issue-378/node_modules/esbuild/lib/main.js:1636:15)
    at /code/issue-378/node_modules/esbuild/lib/main.js:1048:25
    at /code/issue-378/node_modules/esbuild/lib/main.js:1512:9
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errors: [
    {
      detail: undefined,
      id: '',
      location: {
        column: 33,
        file: '../../outline/packages/outline-core/src/controllers/light-dom-styles.ts',
        length: 23,
        line: 3,
        lineText: "import { addScopeToStyles } from '../internal/light-dom';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'Could not resolve "../internal/light-dom"'
    }
  ],
  warnings: []
}

Fixes #378

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Checklist

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: c05263d0f5d111226303301e2f860306a403c941

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

netlify[bot] commented 1 year ago

Deploy Preview for outlinejs ready!

Name Link
Latest commit c05263d0f5d111226303301e2f860306a403c941
Latest deploy log https://app.netlify.com/sites/outlinejs/deploys/644dc8feb1921200080dcaa8
Deploy Preview https://deploy-preview-382--outlinejs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

tekante commented 1 year ago

Commit c05263d0f5d111226303301e2f860306a403c941 fixes the error on yarn run start but it looks like it does not actually fix it for yarn run build so changing title of this to WIP since I don't see a way to convert this back to a draft PR

tekante commented 1 year ago

Based on https://github.com/phase2/outline/pull/385/files the changes in https://github.com/phase2/outline/pull/385/commits/f0c5d516f25f12fc278d03bfa5c49cf1835cd1a1 and https://github.com/phase2/outline/pull/385/commits/8a049d2ce1575a4d7f96d04a71ec83d546361e23 are needed as well. Going to close this one in favor of #385