Skip to content

Commit 9e1c21c

Browse files
fix(bundle): fix bundling of css for lib-esm (stackblitz try 5) bundle css files?
1 parent 1c6ba5b commit 9e1c21c

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@types/d3-interpolate": "^1.1.6",
4444
"@uirouter/core": ">=5.0.0",
4545
"@uirouter/publish-scripts": "2.0.6",
46+
"copy-webpack-plugin": "^4.2.3",
4647
"css-loader": "^0.28.7",
4748
"es6-shim": "^0.35.0",
4849
"file-loader": "^0.11.2",

webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
var webpack = require('webpack');
22
var path = require('path');
3+
var CopyWebpackPlugin = require('copy-webpack-plugin');
34
var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
45

56
module.exports = {
@@ -37,6 +38,8 @@ module.exports = {
3738
'NODE_ENV': JSON.stringify('production')
3839
}
3940
}),
41+
42+
new CopyWebpackPlugin([{ from: 'src/**/*.css', flatten: true }]),
4043
],
4144

4245
resolve: {

yarn.lock

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,10 @@ bluebird@^2.9.13:
323323
version "2.11.0"
324324
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1"
325325

326+
bluebird@^3.5.1:
327+
version "3.5.1"
328+
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
329+
326330
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
327331
version "4.11.8"
328332
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
@@ -833,6 +837,17 @@ cookie@0.3.1:
833837
version "0.3.1"
834838
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
835839

840+
copy-webpack-plugin@^4.2.3:
841+
version "4.2.3"
842+
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.2.3.tgz#4a3c61089f3b635777f0f0af346c338b39d63755"
843+
dependencies:
844+
bluebird "^3.5.1"
845+
glob "^7.1.2"
846+
is-glob "^4.0.0"
847+
loader-utils "^0.2.15"
848+
lodash "^4.3.0"
849+
minimatch "^3.0.4"
850+
836851
core-util-is@~1.0.0:
837852
version "1.0.2"
838853
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -2033,7 +2048,7 @@ is-extglob@^1.0.0:
20332048
version "1.0.0"
20342049
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
20352050

2036-
is-extglob@^2.1.0:
2051+
is-extglob@^2.1.0, is-extglob@^2.1.1:
20372052
version "2.1.1"
20382053
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
20392054

@@ -2065,6 +2080,12 @@ is-glob@^3.1.0:
20652080
dependencies:
20662081
is-extglob "^2.1.0"
20672082

2083+
is-glob@^4.0.0:
2084+
version "4.0.0"
2085+
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0"
2086+
dependencies:
2087+
is-extglob "^2.1.1"
2088+
20682089
is-number@^2.0.2, is-number@^2.1.0:
20692090
version "2.1.0"
20702091
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
@@ -2285,6 +2306,15 @@ loader-runner@^2.3.0:
22852306
version "2.3.0"
22862307
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
22872308

2309+
loader-utils@^0.2.15:
2310+
version "0.2.17"
2311+
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
2312+
dependencies:
2313+
big.js "^3.1.3"
2314+
emojis-list "^2.0.0"
2315+
json5 "^0.5.0"
2316+
object-assign "^4.0.1"
2317+
22882318
loader-utils@^1.0.2, loader-utils@^1.1.0:
22892319
version "1.1.0"
22902320
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
@@ -2417,7 +2447,7 @@ lodash.uniq@^4.5.0:
24172447
version "4.5.0"
24182448
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
24192449

2420-
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.2.1:
2450+
lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.2.1, lodash@^4.3.0:
24212451
version "4.17.4"
24222452
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
24232453

0 commit comments

Comments
 (0)