Skip to content

Commit

Permalink
fix(webpack): get Babel from externals
Browse files Browse the repository at this point in the history
  • Loading branch information
levithomason committed Oct 3, 2016
1 parent f8912a5 commit 3928e2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/app/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
<head>
<meta charset="UTF-8">
<link rel="shortcut icon" type="image/x-icon" href=<%= (__BASE__ || '') + '/logo.png' %> />
<script
src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/<%= htmlWebpackPlugin.options.versions.babel %>/babel.min.js"
data-presets="es2015,react,stage1"
></script>
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/<%= htmlWebpackPlugin.options.versions.sui %>/semantic.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/Faker/<%= htmlWebpackPlugin.options.versions.faker %>/faker.min.js"></script>
Expand Down
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ webpackConfig.plugins = [
collapseWhitespace: true,
},
versions: {
babel: require('babel-standalone/package.json').version,
sui: require('semantic-ui-css/package.json').version,
faker: require('faker/package.json').version,
lodash: require('lodash/package.json').version,
Expand Down Expand Up @@ -191,6 +192,7 @@ if (__TEST__ || argv.localModules) {
webpackConfig.externals = {
faker: 'faker',
'anchor-js': 'AnchorJS',
Babel: 'babel-standalone',
}
}

Expand Down
1 change: 1 addition & 0 deletions webpack.umd.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const webpackUMDConfig = {
externals: {
react: 'React',
'react-dom': 'ReactDOM',
Babel: 'babel-standalone',
},
plugins: [
new webpack.optimize.OccurrenceOrderPlugin(),
Expand Down

0 comments on commit 3928e2b

Please sign in to comment.