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

Strange Lines on top on build/index.js file #251

Closed
loicgeek opened this issue Oct 30, 2019 · 9 comments
Closed

Strange Lines on top on build/index.js file #251

loicgeek opened this issue Oct 30, 2019 · 9 comments

Comments

@loicgeek
Copy link

loicgeek commented Oct 30, 2019

I have created my vue plugin but there are errors when I built with bili, these lines appear on top of the build/index.js file

/*!
 * vue-easy-printer v1.0.0
 * (c) loicgeek
 * Released under the MIT License.
 */
'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var __vue_normalize__ = _interopDefault(require('F:PERSONNAL�ue-easy-printer
ode_modules
ollup-plugin-vue
untime
ormalize.js'));
var __vue_create_injector__ = _interopDefault(require('F:PERSONNAL�ue-easy-printer
ode_modules
ollup-plugin-vue
untime�rowser.js'));

that is my package.json file

  "name": "vue-easy-printer",
  "version": "1.0.0",
  "private": false,
  "description": "The Best Vue Plugin To convert Html page, Components to pdf",
  "main": "./dist/index.js",
  "keywords": [
    "Vuejs",
    "html",
    "pdf"
  ],
  "files": [
    "dist/*"
  ],
  "scripts": {
    "build": "bili --name index --plugin vue "
  },
  "author": "loicgeek",
  "license": "MIT",
  "devDependencies": {
    "bili": "^4.8.1",
    "rollup-plugin-vue": "^5.1.2",
    "vue-template-compiler": "^2.6.10"
  }
}

And my bili.config.js file

module.exports = {
  banner: true,
  output: {
    extractCSS: false,
  },
  plugins: {
    vue: {
      css: true
    }
  }
}; 

To run the build process , i ran :

 npx bili --bundle-node-modules
@HaydenHodge
Copy link

I am encountering the exact strange issue:

import __vue_normalize__ from 'C:projectsVueGoodTable�ue-good-table
ode_modules
ollup-plugin-vue
untime
ormalize.js';

The first letter of (n)ode_modules, (r)ollup-plugin-vue, (r)untime, (n)ormalize.js are all missing.
Another observation is the lack of '/' in the folder path and the unrecognized character.
I would expect: 'C:projects/VueGoodTable/vue-good-table'

My Config:

module.exports = {
  banner,
  output: {
    fileName: (context, defaultFileName) => {
      if (context.format === 'umd' || context.format === 'umd-min') {
        return 'vue-good-table[min].js';
      }
      return 'vue-good-table.[format].js';
    },
    moduleName: 'vue-good-table',
    format: [
      'cjs',
      'es',
      'umd',
      'umd-min',
    ],
  },
  plugins: {
    commonjs: true,
    vue: {
      css: false,
    },
  },
  bundleNodeModules: true,
};

@HaydenHodge
Copy link

Update: I believe this is only occurring on Windows. My colleague was able to run the exact command with the exact configuration without any issues on his Linux machine.

@loicgeek
Copy link
Author

loicgeek commented Oct 31, 2019 via email

@johannes-z
Copy link

rollup-plugin-vue is broken in version 5.1.2. Version 5.1.1 works fine.

@hosein2398
Copy link
Contributor

This is not actually related to Bili but rollup-plugin-vue.
vuejs/rollup-plugin-vue#303

@cannap
Copy link

cannap commented Dec 3, 2019

how to fix it? is there a way to tell bili to user a other version

@loicgeek
Copy link
Author

loicgeek commented Dec 3, 2019

how to fix it? is there a way to tell bili to user a other version

downgrade rollup-plugin-vue to 5.1.1

@cannap
Copy link

cannap commented Dec 3, 2019

ah lol i trought its built in

@fi3ework
Copy link
Collaborator

fi3ework commented May 2, 2020

Not a bug of bili. Closed by #343

@fi3ework fi3ework closed this as completed May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants