mariusbalcytis / webpack-bundle

Bundle to Integrate Webpack into Symfony
MIT License
122 stars 36 forks source link

twig errors after compile #27

Closed matthbull closed 7 years ago

matthbull commented 7 years ago

hiya,

I have everything working perfectly in the dev environment with the dev-server running.

Hash: cba6d6426a6825aa4ce2 Version: webpack 1.13.3 Time: 78ms Asset Size Chunks Chunk Names main.18f06a3dee575878572b.js 282 bytes 0 [emitted] main main.18f06a3dee575878572b.js.map 3.4 kB 0 [emitted] main [0] multi main 16 bytes {0} [built]

But in production after I run maba:webpack:compile, (output above), the site 500's with the following:

Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("No information in manifest for @AppBundle/Resources/assets/entry.js

Everything seems to compile fine. The actual manifest file is as follows:

<?php return array (
  'main' => 
  array (
    'js' => '/compiled/main.18f06a3dee575878572b.js',
  ),

any ideas?

mariusbalcytis commented 7 years ago

It looks that prod environment does not check that folder.

Is your bundle configuration the same for both dev and prod environments? Maybe you use several/different maba_webpack parts in config.yml, config_prod.yml, config_dev.yml?

Does maba:webpack:compile in dev environment produce expected manifest file?

lenybernard commented 7 years ago

I had the same issue but it was related to Uglify a which was throwing a SyntaxError with es2015 syntax, there is some solutions here: https://github.com/mishoo/UglifyJS2/issues/448

mariusbalcytis commented 7 years ago

Closing as cannot reproduce