Closed spiroski closed 7 years ago
If you've got this error you've either did not run dev-server (I guess you did) or you've got an error. You should see it in dev-server output.
I also assume you have installed bootstrap-sass?
I have installed bootstrap-sass, and there is no error in the dev-server. Just in case I also tried with compile. This is the output ( no error ):
Hash: 14a2ab04895d6bbbd4ca
Version: webpack 1.14.0
Time: 5430ms
Asset Size Chunks Chunk Names
bootstrap-b7f5bc1fb5a2a79e7c4f40fb0c01e3ac4212473a.bundle.js 631 kB 0 [emitted] bootstrap-b7f5bc1fb5a2a79e7c4f40fb0c01e3ac4212473a
messaging-376ba8df9eaa1f6be03885ae3fae98d5a271d833.bundle.js 1.81 MB 1 [emitted] messaging-376ba8df9eaa1f6be03885ae3fae98d5a271d833
+ 383 hidden modules
And here's the generated manifest:
<?php return array (
'bootstrap-b7f5bc1fb5a2a79e7c4f40fb0c01e3ac4212473a' =>
array (
'js' => '/compiled/bootstrap-b7f5bc1fb5a2a79e7c4f40fb0c01e3ac4212473a.bundle.js',
),
'messaging-376ba8df9eaa1f6be03885ae3fae98d5a271d833' =>
array (
'js' => '/compiled/messaging-376ba8df9eaa1f6be03885ae3fae98d5a271d833.bundle.js',
),
);
Here is a gist of the file bootstrap-b7f5bc1fb5a2a79e7c4f40fb0c01e3ac4212473a.bundle.js
https://gist.github.com/spiroski/61d033fd2b25a9e533ca8f4c223a1b75
Could it be that you're using older version of this bundle? If so, try adding
maba_webpack:
config:
parameters:
extract_css: true
This defaulted to false
in earlier version, currently it defaults to true
inside webpack.config.js
.
Or maybe you've installed older version and after update you did not re-run bin/compile maba:webpack:setup
command?
That was the problem. After adding that to the config it works. Should I rerun the setup?
Yes, setup command should be re-run each time the bundle is updated. If you've modified the config, it should be merged. This way bundle can introduce new properties, environment variables and features inside default configuration files.
I have a problem using scss files.
I have a file
bootstrap.scss
located inapp/Resources/assets/bootstrap/
.the contents of the file just in case it's important are:
Inside my
base.html.twig
file i haveThis generates the following error when I try to load the page:
my
config.yml
contains only this regarding this bundle:And my webpack.config.js is the default one.