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

Is this possible to use webpack to deploy? #23

Open
tedwong opened this issue Oct 25, 2016 · 1 comment
Open

Is this possible to use webpack to deploy? #23

tedwong opened this issue Oct 25, 2016 · 1 comment

Comments

@tedwong
Copy link

tedwong commented Oct 25, 2016

My webpack.config.js:


... 

  resolve: {
      modulesDirectories: ['node_modules','bower_components'],
  },
  plugins:[
        new webpack.ResolverPlugin(
            new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin(".bower.json",["d3","dot-checker","layout-worker","worker","renderer"])
        )
  ],
  paths: {
    es6: '/node_modules/requirejs-babel/es6',
    babel: '/node_modules/requirejs-babel/babel-5.8.22.min',

        d3: '/bower_components/d3/d3',
        "dot-checker": '/bower_components/graphviz-d3-renderer/dist/dot-checker',
        "layout-worker": '/bower_components/graphviz-d3-renderer/dist/layout-worker',
        worker: '/bower_components/requirejs-web-workers/src/worker',
        renderer: '/bower_components/graphviz-d3-renderer/dist/renderer',
}


...

My main.js:

    require(["renderer"],
        function (renderer) {

          dotSource = 'XXXXXX';

          // initialize svg stage
          renderer.init("#graph");

          // update stage with new dot source
          renderer.render(dotSource);
        });

I receive an error:

Module not found: Error: Cannot resolve module 'renderer' in XXX

@mstefaniuk
Copy link
Owner

This project is provided as require.js module. I'm not sure if it is compatible with webpack also.

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

2 participants