Skip to content

Commit b3e0c81

Browse files
committed
Put in workarounds for the webpack for the html manager test suite.
1 parent 55f86af commit b3e0c81

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

jupyter-widgets-htmlmanager/test/webpack.conf.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var path = require('path');
2+
var postcss = require('postcss');
23

34
module.exports = {
45
entry: './test/build/index.js',
@@ -17,10 +18,22 @@ module.exports = {
1718
{ test: /\.json$/, loader: 'json-loader' },
1819
],
1920
},
20-
postcss: function () {
21+
postcss: () => {
2122
return [
22-
require('postcss-import'),
23-
require('postcss-cssnext')
23+
postcss.plugin('delete-tilde', () => {
24+
return function (css) {
25+
css.walkAtRules('import', (rule) => {
26+
rule.params = rule.params.replace('~', '');
27+
});
28+
};
29+
}),
30+
postcss.plugin('prepend', () => {
31+
return (css) => {
32+
css.prepend(`@import '@jupyter-widgets/controls/css/labvariables.css';`)
33+
}
34+
}),
35+
require('postcss-import')(),
36+
require('postcss-cssnext')()
2437
];
2538
}
2639
}

0 commit comments

Comments
 (0)