Unverified Commit 5610e1b2 authored by Ray Schamp's avatar Ray Schamp Committed by GitHub

Merge pull request #5719 from paulkaplan/dynamic-import

Support dynamic imports to load code only when needed
parents c5110d04 81ff3d62
{ {
"plugins": [ "plugins": [
"transform-object-rest-spread", "transform-object-rest-spread",
"transform-require-context" "transform-require-context",
"syntax-dynamic-import"
], ],
"presets": ["es2015", "react"], "presets": ["es2015", "react"],
} }
...@@ -3396,6 +3396,12 @@ ...@@ -3396,6 +3396,12 @@
} }
} }
}, },
"babel-plugin-syntax-dynamic-import": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz",
"integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=",
"dev": true
},
"babel-plugin-syntax-flow": { "babel-plugin-syntax-flow": {
"version": "6.18.0", "version": "6.18.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz",
...@@ -59,11 +59,11 @@ ...@@ -59,11 +59,11 @@
<div id="app"></div> <div id="app"></div>
<!-- Vendor & Initialize (Session & Localization)--> <!-- Vendor & Initialize (Session & Localization)-->
<script src="/<%= htmlWebpackPlugin.files.chunks.common.entry %>"></script> <script src="<%= htmlWebpackPlugin.files.chunks.common.entry %>"></script>
<!-- Scripts --> <!-- Scripts -->
<script src="/js/<%= htmlWebpackPlugin.options.route.name %>.intl.js"></script> <script src="/js/<%= htmlWebpackPlugin.options.route.name %>.intl.js"></script>
<script src="/<%= htmlWebpackPlugin.files.chunks[htmlWebpackPlugin.options.route.name].entry %>"></script> <script src="<%= htmlWebpackPlugin.files.chunks[htmlWebpackPlugin.options.route.name].entry %>"></script>
<!-- Translate title element --> <!-- Translate title element -->
<% if (!htmlWebpackPlugin.options.dynamicMetaTags) { %> <% if (!htmlWebpackPlugin.options.dynamicMetaTags) { %>
......
...@@ -72,7 +72,8 @@ module.exports = { ...@@ -72,7 +72,8 @@ module.exports = {
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development', mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
output: { output: {
path: path.resolve(__dirname, 'build'), path: path.resolve(__dirname, 'build'),
filename: 'js/[name].bundle.js' filename: 'js/[name].bundle.js',
publicPath: '/'
}, },
resolve: { resolve: {
symlinks: false // Fix local development with `npm link` packages symlinks: false // Fix local development with `npm link` packages
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment