aurelia / bundler

A library for bundling JavaScript, HTML and CSS for use with SystemJS.
MIT License
37 stars 25 forks source link

[Question] Gulp Export Failed #123

Closed dev0x10 closed 8 years ago

dev0x10 commented 8 years ago

I have a problem with export I'm using skeleton project and I have a problem with 'gulp export' I think this is related to gulp config but I'm wondering if any of you know how to solve this. Here is my folder structure project structure And in some of classes using import from the 'api' folder

import {inject} from 'aurelia-framework';
import {MerchantApi} from '../../api/merchant-api';
import {Router} from 'aurelia-router';
import {AppState} from 'app-state';

My gulp bundle config

'dist/app-build': {
      includes: [
        '[*.js'],
        '[**/*.js]',
        '*.html!text',
        '*.css!text',
        '**/*.html!text'
      ],
      options: {
        inject: true,
        minify: true,
        depCache: true,
        rev: false
      }
    },

All classes that using 'import {MerchantApi} from '../../api/merchant-api';' will not find the file of 'merchant-api.js'

ahmedshuhel commented 8 years ago

Does it work without bundling?

dev0x10 commented 8 years ago

@ahmedshuhel 'gulp watch' and 'gulp bundle' works fine but 'gulp export' doesn't work here is my export.js file content

module.exports = {
  list: [
    'index.html',
    'config.js',
    'favicon.ico',
    'jspm_packages/system.js',
    'jspm_packages/system-polyfills.js',
    'jspm_packages/system-csp-production.js',
    'styles/styles.css',
    'jspm_packages/npm/font-awesome@4.6.1/css/font-awesome.min.css',
    'jspm_packages/npm/font-awesome@4.6.1/fonts/*',
    'jspm_packages/github/github/fetch@0.11.0.js',
    'jspm_packages/github/github/fetch@0.11.0/fetch.js',
    'jspm_packages/github/dogfalo/materialize@0.97.6/fonts/**/*',
    'jspm_packages/github/dogfalo/materialize@0.97.6/font/**/*'
  ]
};

I'm struggling more in bundle than developing in Aurelia :(

dev0x10 commented 8 years ago

@ahmedshuhel after digging I found this similar issue https://github.com/aurelia/bundler/issues/103

Now I know how to solve 👍 Thanks!