Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"component.__file" uses absolut path #258

s-bauer opened this issue Jan 13, 2019 · 1 comment

"component.__file" uses absolut path #258

s-bauer opened this issue Jan 13, 2019 · 1 comment


Copy link

@s-bauer s-bauer commented Jan 13, 2019

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

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!

Copy link

@znck znck commented Jan 14, 2019

--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

@znck znck closed this in e28b7ab Jan 14, 2019
gluons added a commit to gluons/vue-up that referenced this issue Jan 20, 2019
Also prevent exposing full path of component file in `component.__file`. (See vuejs/rollup-plugin-vue#258)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants