Skip to content

BundelTracker incompatibility  #16

@martynvandijke

Description

@martynvandijke

Hi all, I am fairly new to react and webpack.
But once I want to implement the prepack wepback optimisation, it gives an invalid RegExp SyntaxError
as described by :
Are my settings not right, or is this a deeper level bug with the bundletracker?

invalid RegExp
SyntaxError
    at call (native)
    at __webpack_require__ (main-fac13eab93be169f21c7.js:20:12)
    at main-fac13eab93be169f21c7.js:26551:21
    at call (native)
    at call (native)
    at __webpack_require__ (main-fac13eab93be169f21c7.js:20:12)
    at main-fac13eab93be169f21c7.js:76:18
    at call (native)
    at __webpack_require__ (main-fac13eab93be169f21c7.js:20:12)
    at main-fac13eab93be169f21c7.js:60502:14
    at call (native)
    at __webpack_require__ (main-fac13eab93be169f21c7.js:20:12)
    at main-fac13eab93be169f21c7.js:64028:12
    at call (native)
    at __webpack_require__ (main-fac13eab93be169f21c7.js:20:12)
    at main-fac13eab93be169f21c7.js:66:18
    at main-fac13eab93be169f21c7.js:1:10
{directory}/node_modules/prepack/lib/prepack-standalone.js:59
    throw new InitializationError();

My webpack config:

var path = require("path")
var webpack = require('webpack')
var BundleTracker = require('webpack-bundle-tracker')
var PrepackWebpackPlugin = require('prepack-webpack-plugin').default;
const configuration = {};

module.exports = {
  context: __dirname,
  entry: './assets/js/index', 

  output: {
    path: path.resolve('./assets/bundles/'),
    filename: "[name]-[hash].js",
  },

  plugins: [
    new BundleTracker({ filename: './webpack-stats.json' }),
    new PrepackWebpackPlugin(configuration)

  ],

  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel-loader',
        query:
        {
          presets: ['es2015', 'react','stage-0']
        }
      }, 
    ],
  },

  resolve: {
    modules: ['node_modules'],
    extensions: ['.js', '.jsx']
  },
  node: {
    fs: 'empty'
  },
  externals: [
    { "./cptable": "var cptable" }
  ]

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions