Skip to content

Commit

Permalink
change debug js files path
Browse files Browse the repository at this point in the history
  • Loading branch information
chemdemo committed Aug 11, 2015
1 parent 3c2d6e2 commit 0b918b9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
11 changes: 8 additions & 3 deletions make-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: dmyang
* @Date: 2015-08-02 14:16:41
* @Last Modified by: dmyang
* @Last Modified time: 2015-08-05 03:40:36
* @Last Modified time: 2015-08-12 00:34:44
*/

'use strict';
Expand All @@ -27,7 +27,7 @@ var assets = 'assets/';
var sourceMap = require('./src/sourcemap.json');

var excludeFromStats = [
/node_modules[\\\/]items-store[\\\/]/
/node_modules[\\\/]/
];

function makeConf(options) {
Expand All @@ -45,7 +45,7 @@ function makeConf(options) {
filename: debug ? '[name].js' : 'js/[chunkhash:8].[name].min.js',
chunkFilename: debug ? '[chunkhash:8].chunk.js' : 'js/[chunkhash:8].chunk.min.js',
hotUpdateChunkFilename: debug ?'[id].[chunkhash:8].js' : 'js/[id].[chunkhash:8].min.js',
publicPath: ''
publicPath: debug ? '/__build/' : ''
},

resolve: {
Expand Down Expand Up @@ -135,6 +135,11 @@ function makeConf(options) {
// @see https://github.com/kangax/html-minifier
var conf = {
template: path.resolve(srcDir, filename),
// @see https://github.com/kangax/html-minifier
// minify: {
// collapseWhitespace: true,
// removeComments: true
// },
filename: filename
};

Expand Down
4 changes: 2 additions & 2 deletions src/a.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ <h1>page a</h1>
<div id="dialog" class="none dialog">dialog</div>
<p><i class="icon-cart"></i></p>
<p id="logo"></p>
<script data-debug src="vendors.js"></script>
<script data-debug src="a.js"></script>
<script data-debug src="/__build/vendors.js"></script>
<script data-debug src="/__build/a.js"></script>
</body>

</html>
4 changes: 2 additions & 2 deletions src/b.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

<body>
<h1>page b</h1>
<script data-debug src="vendors.js"></script>
<script data-debug src="b.js"></script>
<script data-debug src="/__build/vendors.js"></script>
<script data-debug src="/__build/b.js"></script>
</body>

</html>

0 comments on commit 0b918b9

Please sign in to comment.