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

Include Vendor presets on Lw.materials #3

Open
ghost opened this issue Jul 14, 2017 · 6 comments
Open

Include Vendor presets on Lw.materials #3

ghost opened this issue Jul 14, 2017 · 6 comments

Comments

@ghost
Copy link

ghost commented Jul 14, 2017

To allow vendor's specific material databases to be applied when a vendor is selected.

@ghost ghost added the enhancement label Jul 14, 2017
@jorgerobles
Copy link
Contributor

@tbfleming is there a way to load a file with webpack on runtime? I'm pondering two ways to load vendor material database:

  • Use static import/require, that will fatten the overall codebase
  • Use ajax load of the vendor json (But I don't know how with webpack thingy)

@tbfleming
Copy link
Member

@cheton
Copy link

cheton commented Jul 15, 2017

webpack 2 has support for dynamic import(), you can import file on runtime as below:

const context = 'vendor-prefix-name';

import(`./path/to/${context}.json`)
    .then(json => {
        // Further processing
    });

@jorgerobles
Copy link
Contributor

jorgerobles commented Jul 15, 2017 via email

jorgerobles added a commit to LaserWeb/LaserWeb4 that referenced this issue Jul 15, 2017
@jorgerobles
Copy link
Contributor

@Domenic-D Done (http://recordit.co/VGkKd166W0)

I will go for webpack2 approach later (have to migrate from WP1).

@ghost
Copy link
Author

ghost commented Jul 17, 2017

Looks to be working correctly in OSX. Can't compile to check on Win at the moment.

jorgerobles pushed a commit that referenced this issue Sep 17, 2017
Adding leather. Adding anodised aluminum - no cut operation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants