synapse-wireless-labs / component-lab

A component development and testing tool built for Angular, inspired by React Storybook.
79 stars 16 forks source link

chore(webpack): Update webpack to 2.2.1 #12

Closed isaacplmann closed 7 years ago

isaacplmann commented 7 years ago

This allows component-lab to be used along with @angular/cli@1.0.0-beta.31 which uses weback@2.2.x.

I had to add a few lines to the component-lab.config.js file:

const NgCliWebpackConfig = require('@angular/cli/models/webpack-config').NgCliWebpackConfig;

module.exports = {
  /**
   * Webpack configuration object used to load your experiments
   */
  webpackConfig: new NgCliWebpackConfig({
    target: 'development',
  }).config,
  ...
}

And in my lab modules:

import 'path/to/polyfills.ts';
MikeRyanDev commented 7 years ago

Changes LGTM. Will merge and publish tonight.

cgatian commented 7 years ago

@isaacplmann Thanks for taking a look at this!

I tried to fix myself but kept running into issues with Angular 2.4.6 during the dynamic component factory methods. Did you have any issues in 2.4.6? Maybe it was something misconfigured on my end.

isaacplmann commented 7 years ago

I just now tried getting component-lab working, and I'm using angular 2.4.7 now. I haven't tried 2.4.6.

MikeRyanDev commented 7 years ago

Published as component-lab@0.0.1-alpha.7

intellix commented 7 years ago

Does this change somewhat with CLI 1.0.0 and ng4? I believe the polyfills are defined in .angular-cli.json and automatically injected now. You can specify multiple apps inside .angular-cli.json and have multiple entrypoints