Skip to content

Commit 470b55e

Browse files
committed
switch to webpack 2
1 parent c959917 commit 470b55e

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ node_modules/
22
.stencil
33
.DS_Store
44
assets/css-artifacts
5-
assets/js/bundle.js
6-
assets/js/bundle.js.map
5+
assets/js/bundles

assets/js/theme/global.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import $ from 'jquery';
22
import './common/select-option-plugin';
3-
import 'html5-history-api';
3+
// import 'html5-history-api';
44
import PageManager from '../page-manager';
55
import quickSearch from './global/quick-search';
66
import currencySelector from './global/currency-selector';

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"@bigcommerce/citadel": "^2.11.5",
1010
"@bigcommerce/stencil-utils": "1.0.5",
1111
"async": "^1.5.2",
12-
"babel-core": "6.7.4",
12+
"babel-core": "^6.22.1",
1313
"babel-eslint": "4.1.0",
14-
"babel-loader": "6.2.4",
14+
"babel-loader": "^6.2.10",
1515
"babel-polyfill": "^6.8.0",
16-
"babel-preset-es2015": "^6.9.0",
16+
"babel-preset-es2015": "^6.22.0",
1717
"babel-preset-es2015-loose": "^7.0.0",
1818
"es6-shim": "0.35.0",
1919
"eslint-config-airbnb": "^6.0.2",
@@ -37,13 +37,13 @@
3737
"karma-phantomjs-launcher": "1.0.0",
3838
"karma-sourcemap-loader": "0.3.7",
3939
"karma-verbose-reporter": "0.0.2",
40-
"karma-webpack": "1.7.0",
40+
"karma-webpack": "^2.0.2",
4141
"load-grunt-config": "0.17.1",
4242
"lodash": "^3.5.0",
4343
"nod-validate": "^2.0.12",
4444
"pace": "hubspot/pace#a03f1f1de62c9cea6c88b2267b8d7a83858b6cb6",
4545
"slick-carousel": "1.5.5",
4646
"time-grunt": "^1.2.2",
47-
"webpack": "^1.14.0"
47+
"webpack": "^2.2.1"
4848
}
4949
}

stencil.conf.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ var bundleLocation = 'assets/js/bundle.js';
66
webpackConfig.context = __dirname;
77
webpackConfig.entry = './assets/js/app.js';
88
webpackConfig.output = {
9-
path: __dirname + '/assets/js',
10-
filename: 'bundle.js'
9+
path: __dirname + '/assets/js/bundles',
10+
filename: '[name].js'
1111
};
1212

1313
/**
@@ -35,6 +35,7 @@ var watchOptions = {
3535
* @param {Object} Bs
3636
*/
3737
function development(Bs) {
38+
delete global.System;
3839
var compiler = webpack(webpackConfig);
3940

4041
// Rebuild the bundle once at bootup

templates/layout/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
{{> components/common/body }}
3333
{{> components/common/footer }}
3434

35-
<script src="{{cdn '/assets/js/bundle.js'}}"></script>
35+
<script src="{{cdn '/assets/js/bundles/main.js'}}"></script>
3636
<script>
3737
// Exported in app.js
3838
window.stencilBootstrap("{{template_file}}", {{jsContext}}).load();

webpack.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = {
77
loaders: [
88
{
99
test: /\.js$/,
10-
loader: 'babel',
10+
loader: 'babel-loader',
1111
include: /(assets\/js|assets\\js|node_modules\/@bigcommerce\/stencil-utils|node_modules\\@bigcommerce\\stencil-utils)/,
1212
query: {
1313
compact: false,

0 commit comments

Comments
 (0)