Skip to content

plugin doesn't update loader #2

@richburdon

Description

@richburdon

For me, adding the plugin doesn't trigger the babel-loader

  plugins: [
    new webpackLinkPlugin({
      'MY_MODULE': [
        path.resolve(__dirname, '../MY_MODULE'),
        {
          test: /\.js$/,
          exclude: [/node_modules/],
          include: [
            path.resolve(__dirname, 'src')
          ],
          loader: 'babel-loader'
        }
      ]
    })

This works, but forces the transpile of the dependent module even if --link isn't specified.

  plugins: [
    new webpackLinkPlugin({
      'MY_MODULE': [
        path.resolve(__dirname, '../MY_MODULE')
      ]
    })

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: [/node_modules/],  // Don't transpile deps.
        include: [
          path.resolve(__dirname, 'src'),
          path.resolve(__dirname, '../MY_MODULE')  // HAVE TO PUT THIS HERE
        ],
        loader: 'babel-loader'
      },
    ]
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions