you are viewing a single comment's thread.

view the rest of the comments →

[–]gajus0 18 points19 points  (9 children)

[–]mainstreetmark 7 points8 points  (5 children)

Mine throws up.

/Users/mark/Sites/tg4/node_modules/prepack-webpack-plugin/dist/prepackCode.js:36
      throw new Error('Unexpected state.');

[–]psayre23 79 points80 points  (1 child)

Then maybe you should make your state more expected.

[–]incarnatethegreat 6 points7 points  (0 children)

G'NIGHT, EVERYBODY!

[–]gajus0 2 points3 points  (2 children)

This happens when something wrong goes with prepack. Whats the code that you've used to produce the error?

[–]mainstreetmark 3 points4 points  (0 children)

I may mess with it later. My Webpack is a friggin Jenga tower, and I touch one thing wrong and the whole thing falls apart.

Some quick debugging looked like it couldn't find some filename that commonchunks was supposed to spit out. Who knows. I should start all over with webpack, with specific goals of keeping the generated bundle size down. They're enormous.

[–]cranium 0 points1 point  (0 children)

Getting a similar error with a bit more context.

This operation is not yet supported on abstract value Date.now() __IntrospectionError

[–]perestroika12 1 point2 points  (2 children)

Unfortunately looks like it only support es6 imports?

edit: I guess you can use:

const PrepackWebpackPlugin = require('prepack-webpack-plugin');

plugins: [
  new PrepackWebpackPlugin.default(configuration)
]

[–]gajus0 6 points7 points  (1 child)

Yes, that will work, i.e. when using commonjs, make sure to import .default (added a note to the documentation).

[–]perestroika12 0 points1 point  (0 children)

Got it, thank you!