Coder Social home page Coder Social logo

Import issues about fuse-box HOT 5 CLOSED

fuse-box avatar fuse-box commented on May 15, 2024
Import issues

from fuse-box.

Comments (5)

nchanged avatar nchanged commented on May 15, 2024
  1. FuseBox API is included
    Remove imports of FuseBox API, it's global.
    just use
    declare const FuseBox : any
    We will fix typings later

  2. FuseBox.import() yes that's an issue. Will check it

from fuse-box.

nchanged avatar nchanged commented on May 15, 2024

UPD:

FuseBox.import('./about.module.js',(data) => {
})

Returns module.exports of that FILE, not the fusebox API

from fuse-box.

nchanged avatar nchanged commented on May 15, 2024

1.3.70 returns undefined if a request returns anything else than 200

from fuse-box.

unlight avatar unlight commented on May 15, 2024

I did not get about issue 1, will it be fixed later? And when declare const FuseBox : any will added to contents?

FuseBox.import('./about.module.js',(data) => {
})

data is fusebox, not a module.exports
Contents of about.module.js http://pastebin.com/fju2KVwM (it fusebox) why it should be module.exports
I did not specified any options to exclude fb api.

Config is same as for main (except entry point).
main: [>main.ts]
about.module: [about.module.ts]

from fuse-box.

nchanged avatar nchanged commented on May 15, 2024

@unlight you don't import FuseBox at any time in your code. I will make a check in AST later to avoid that.

FuseBox.import('./about.module.js',(data) => {
})

If about.module.js is found then you will get whatever that module exports (regular practice).
Based on what you pasted, your code does not have any entry point. First thing off - you should rebundle your about.module.js with an entry point.

Cheers

from fuse-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.