Skip to content

Commit 1803612

Browse files
fix(bundle): fix bundling of css for lib-esm (stackblitz try 4) disable
hmr for style-loader
1 parent 75823f0 commit 1803612

File tree

3 files changed

+6
-37
lines changed

3 files changed

+6
-37
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
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",
4746
"css-loader": "^0.28.7",
4847
"es6-shim": "^0.35.0",
4948
"file-loader": "^0.11.2",

webpack.config.js

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

65
module.exports = {
@@ -38,8 +37,6 @@ module.exports = {
3837
'NODE_ENV': JSON.stringify('production')
3938
}
4039
}),
41-
42-
new CopyWebpackPlugin([{ from: 'src/**/*.css', flatten: true }]),
4340
],
4441

4542
resolve: {
@@ -49,7 +46,10 @@ module.exports = {
4946
module: {
5047
loaders: [
5148
{ test: /\.tsx?$/, loader: 'ts-loader', options: { transpileOnly: true } },
52-
{ test: /\.css$/, loader: 'style-loader!css-loader?sourceMap-loader' },
49+
{ test: /\.css$/, loader: [
50+
{ loader: 'style-loader', options: { hmr: false } },
51+
{ loader: 'css-loader?sourceMap-loader' },
52+
] },
5353
// inline base64 URLs for <=8k images, direct URLs for the rest
5454
{ test: /\.(png|jpg)$/, loader: 'url-loader?limit=8192' },
5555
]

yarn.lock

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,6 @@ 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-
330326
bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0:
331327
version "4.11.8"
332328
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f"
@@ -837,17 +833,6 @@ cookie@0.3.1:
837833
version "0.3.1"
838834
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
839835

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-
851836
core-util-is@~1.0.0:
852837
version "1.0.2"
853838
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -2048,7 +2033,7 @@ is-extglob@^1.0.0:
20482033
version "1.0.0"
20492034
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
20502035

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

@@ -2080,12 +2065,6 @@ is-glob@^3.1.0:
20802065
dependencies:
20812066
is-extglob "^2.1.0"
20822067

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-
20892068
is-number@^2.0.2, is-number@^2.1.0:
20902069
version "2.1.0"
20912070
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
@@ -2306,15 +2285,6 @@ loader-runner@^2.3.0:
23062285
version "2.3.0"
23072286
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
23082287

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-
23182288
loader-utils@^1.0.2, loader-utils@^1.1.0:
23192289
version "1.1.0"
23202290
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
@@ -2447,7 +2417,7 @@ lodash.uniq@^4.5.0:
24472417
version "4.5.0"
24482418
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
24492419

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

0 commit comments

Comments
 (0)