diff --git a/examples/es6-dynamic-import/src/entry.js b/examples/es6-dynamic-import/src/entry.js index 00337d6..86a09b1 100644 --- a/examples/es6-dynamic-import/src/entry.js +++ b/examples/es6-dynamic-import/src/entry.js @@ -2,6 +2,7 @@ import { GTG } from '../../_shared/constants' import { createDom } from '../../_shared/es6-dom' import { es6 } from '../../_shared/logos' import ready from '../../_shared/ready' +import './styles.css' // needed to trigger Babel including array.es6.iterator polyfill // see https://github.com/DanielSchaffer/babel-ie11-dynamic-import-array-iterator-repro diff --git a/examples/es6-dynamic-import/src/plugins/a/plugin.js b/examples/es6-dynamic-import/src/plugins/a/plugin.js index ee95826..ea991ec 100644 --- a/examples/es6-dynamic-import/src/plugins/a/plugin.js +++ b/examples/es6-dynamic-import/src/plugins/a/plugin.js @@ -1,2 +1,4 @@ +import './styles-a.css' + const log = () => console.log('plugin a') log() diff --git a/examples/es6-dynamic-import/src/plugins/a/styles-a.css b/examples/es6-dynamic-import/src/plugins/a/styles-a.css new file mode 100644 index 0000000..74031be --- /dev/null +++ b/examples/es6-dynamic-import/src/plugins/a/styles-a.css @@ -0,0 +1,3 @@ +html { + background: red; +} diff --git a/examples/es6-dynamic-import/src/plugins/b/plugin.js b/examples/es6-dynamic-import/src/plugins/b/plugin.js index 3e99639..069df58 100644 --- a/examples/es6-dynamic-import/src/plugins/b/plugin.js +++ b/examples/es6-dynamic-import/src/plugins/b/plugin.js @@ -1,2 +1,4 @@ +import './styles-b.css' + const log = () => console.log('plugin b') log() diff --git a/examples/es6-dynamic-import/src/plugins/b/styles-b.css b/examples/es6-dynamic-import/src/plugins/b/styles-b.css new file mode 100644 index 0000000..c913323 --- /dev/null +++ b/examples/es6-dynamic-import/src/plugins/b/styles-b.css @@ -0,0 +1,3 @@ +html { + background: blue; +} diff --git a/examples/es6-dynamic-import/src/styles.css b/examples/es6-dynamic-import/src/styles.css new file mode 100644 index 0000000..fe934ba --- /dev/null +++ b/examples/es6-dynamic-import/src/styles.css @@ -0,0 +1,3 @@ +html { + background: white; +} diff --git a/examples/es6-dynamic-import/webpack.config.js b/examples/es6-dynamic-import/webpack.config.js index 4803699..cda89ef 100644 --- a/examples/es6-dynamic-import/webpack.config.js +++ b/examples/es6-dynamic-import/webpack.config.js @@ -1,6 +1,8 @@ -const BabelMultiTargetPlugin = require('../../').BabelMultiTargetPlugin +const MiniCssExtractPlugin = require('mini-css-extract-plugin') // const NamedLazyChunksPlugin = require('../../').NamedLazyChunksPlugin +const BabelMultiTargetPlugin = require('../../').BabelMultiTargetPlugin + /** * @type {Configuration} * @@ -18,12 +20,20 @@ module.exports = { test: /\.js$/, use: BabelMultiTargetPlugin.loader(), }, + { + test: /\.css$/, + use: [ + MiniCssExtractPlugin.loader, + 'css-loader', + ], + }, ], }, plugins: [ // enable for smarter dynamic chunk naming // new NamedLazyChunksPlugin(), + new MiniCssExtractPlugin(), ], }