Guest User

Untitled

a guest
Feb 19th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. // webpack.config.js
  2. var Encore = require('@symfony/webpack-encore');
  3. var LiveReloadPlugin = require('webpack-livereload-plugin');
  4.  
  5. Encore
  6. // directory where all compiled assets will be stored
  7. .setOutputPath('dist/')
  8.  
  9. // what's the public path to this directory (relative to your project's document root dir)
  10. .setPublicPath('/dist')
  11.  
  12. // empty the outputPath dir before each build
  13. .cleanupOutputBeforeBuild()
  14.  
  15. // will output as web/build/app.js
  16. .addEntry('app', './js/main.js')
  17.  
  18. // will output as web/build/global.css
  19. .addStyleEntry('global', './style/style.scss')
  20.  
  21. .addStyleEntry('code', './style/code-snippets.scss')
  22.  
  23. .addStyleEntry('editor-style', './style/editor-style.scss')
  24.  
  25. // allow sass/scss files to be processed
  26. .enableSassLoader()
  27.  
  28. .enablePostCssLoader()
  29.  
  30. // allow legacy applications to use $/jQuery as a global variable
  31. //.autoProvidejQuery()
  32.  
  33. .enableSourceMaps(!Encore.isProduction())
  34.  
  35. // create hashed filenames (e.g. app.abc123.css)
  36. .enableVersioning( Encore.isProduction() )
  37. ;
  38.  
  39. // export the final configuration
  40. var config = Encore.getWebpackConfig();
  41.  
  42. config.plugins.push(new LiveReloadPlugin() );
  43.  
  44. module.exports = config;
Add Comment
Please, Sign In to add comment