Skip to content

Commit 1703161

Browse files
test: added
1 parent 69a46dd commit 1703161

File tree

5 files changed

+124
-0
lines changed

5 files changed

+124
-0
lines changed

test/cases/es-named-and-default-export-1/empty.css

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/******/ (() => { // webpackBootstrap
2+
/******/ "use strict";
3+
/******/ var __webpack_modules__ = ([
4+
/* 0 */,
5+
/* 1 */
6+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7+
8+
__webpack_require__.r(__webpack_exports__);
9+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
10+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
11+
/* harmony export */ });
12+
// extracted by mini-css-extract-plugin
13+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({});
14+
15+
/***/ })
16+
/******/ ]);
17+
/************************************************************************/
18+
/******/ // The module cache
19+
/******/ var __webpack_module_cache__ = {};
20+
/******/
21+
/******/ // The require function
22+
/******/ function __webpack_require__(moduleId) {
23+
/******/ // Check if module is in cache
24+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
25+
/******/ if (cachedModule !== undefined) {
26+
/******/ return cachedModule.exports;
27+
/******/ }
28+
/******/ // Create a new module (and put it into the cache)
29+
/******/ var module = __webpack_module_cache__[moduleId] = {
30+
/******/ // no module.id needed
31+
/******/ // no module.loaded needed
32+
/******/ exports: {}
33+
/******/ };
34+
/******/
35+
/******/ // Execute the module function
36+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
37+
/******/
38+
/******/ // Return the exports of the module
39+
/******/ return module.exports;
40+
/******/ }
41+
/******/
42+
/************************************************************************/
43+
/******/ /* webpack/runtime/define property getters */
44+
/******/ (() => {
45+
/******/ // define getter functions for harmony exports
46+
/******/ __webpack_require__.d = (exports, definition) => {
47+
/******/ for(var key in definition) {
48+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
49+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
50+
/******/ }
51+
/******/ }
52+
/******/ };
53+
/******/ })();
54+
/******/
55+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
56+
/******/ (() => {
57+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
58+
/******/ })();
59+
/******/
60+
/******/ /* webpack/runtime/make namespace object */
61+
/******/ (() => {
62+
/******/ // define __esModule on exports
63+
/******/ __webpack_require__.r = (exports) => {
64+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
65+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
66+
/******/ }
67+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
68+
/******/ };
69+
/******/ })();
70+
/******/
71+
/************************************************************************/
72+
var __webpack_exports__ = {};
73+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
74+
(() => {
75+
__webpack_require__.r(__webpack_exports__);
76+
/* harmony import */ var _empty_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
77+
78+
79+
// eslint-disable-next-line no-console
80+
console.log({ css: _empty_css__WEBPACK_IMPORTED_MODULE_0__["default"] });
81+
82+
})();
83+
84+
/******/ })()
85+
;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import css from "./empty.css";
2+
3+
// eslint-disable-next-line no-console
4+
console.log({ css });
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import Self from "../../../src";
2+
3+
module.exports = {
4+
entry: "./index.js",
5+
module: {
6+
rules: [
7+
{
8+
test: /\.css$/,
9+
use: [
10+
{
11+
loader: Self.loader,
12+
options: {
13+
defaultExport: true,
14+
},
15+
},
16+
{
17+
loader: "css-loader",
18+
options: {
19+
esModule: true,
20+
modules: {
21+
namedExport: true,
22+
},
23+
},
24+
},
25+
],
26+
},
27+
],
28+
},
29+
plugins: [
30+
new Self({
31+
filename: "[name].css",
32+
}),
33+
],
34+
};

0 commit comments

Comments
 (0)