Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

"component.__file" uses absolut path #258

Closed

Description

@s-bauer

There has been an issue about this before, but it was closed, but not fixed (as far as I understand):
#221

The problem is that I want to bundle and release a vuejs component library. However it contains absolut paths like the following

component.__file = "D:\\Source\\office-ui-fabric-vue\\packages\\office-ui-fabric-vue\\src\\FocusTrapZone\\FocusTrapZone.vue";

I did not find any solution on how to remove this! It even states in a comment above the line: "// For security concerns, we use only base name in production mode.". This is not the case however!

Activity

  1. znck commented on Jan 14, 2019

    @znck
    Member

    https://rollupjs.org/guide/en#command-line-flags

    --environment <values>

    Pass additional settings to the config file via process.ENV.

    rollup -c --environment BUILD:production
    will set process.env.BUILD === 'production'. This enables you for instance to overwrite environment variables in package.json scripts:

    // in package.json

    {
      "scripts": {
       "build": "rollup -c --environment INCLUDE_DEPS,BUILD:production"
      }
    }

    If you call this script via:

    npm run build -- --environment BUILD:production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions