-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (32 loc) · 1.25 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var Encore = require('@symfony/webpack-encore');
Encore
.setOutputPath('public/build/')
.setPublicPath('/build')
.cleanupOutputBeforeBuild()
// .autoProvidejQuery()
// .autoProvideVariables({
// "window.jQuery": "jquery",
// "window.Bloodhound": require.resolve('bloodhound-js'),
// "jQuery.tagsinput": "bootstrap-tagsinput"
// })
.enableSassLoader()
.enableVersioning(false)
// .createSharedEntry('js/common', ['jquery'])
.addEntry('main', './vue-app/main.js')
.enableVueLoader()
.addLoader({ test: /\.styl$/, loader: 'style-loader!css-loader!stylus-loader' })
// .addEntry('js/login', './assets/js/login.js')
// .addEntry('js/admin', './assets/js/admin.js')
// .addEntry('js/search', './assets/js/search.js')
// .addStyleEntry('css/app', ['./assets/scss/app.scss'])
// .addStyleEntry('css/admin', ['./assets/scss/admin.scss'])
;
module.exports = Encore.getWebpackConfig();
//Compile asset once
// yarn run encore dev
//Recompile asset automatic when files chances
// yarn run encore dev --watch
//Compile asset minify for production
// yarn run encore production
//Api-platform generate vue files
//generate-api-platform-client -g vue https://demo.api-platform.com src/ --resource foo