@razerspine/webpack-core 1.0.9 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/config/base.d.ts
CHANGED
|
@@ -2,13 +2,9 @@ import { ModeType } from '../types/mode-type';
|
|
|
2
2
|
import { ConfigOptionType } from '../types/config-option-type';
|
|
3
3
|
export declare function createBaseConfig(options: ConfigOptionType): {
|
|
4
4
|
mode: ModeType;
|
|
5
|
-
|
|
6
|
-
* IMPORTANT:
|
|
7
|
-
* Disable default webpack entry (./src)
|
|
8
|
-
* because entry is fully controlled by pug-plugin
|
|
9
|
-
*/
|
|
10
|
-
entry: () => {};
|
|
5
|
+
context: string;
|
|
11
6
|
output: {
|
|
7
|
+
path: string;
|
|
12
8
|
clean: boolean;
|
|
13
9
|
};
|
|
14
10
|
module: {
|
package/dist/config/base.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.createBaseConfig = createBaseConfig;
|
|
4
7
|
const assets_1 = require("../loaders/assets");
|
|
5
8
|
const scripts_1 = require("../loaders/scripts");
|
|
6
9
|
const styles_1 = require("../loaders/styles");
|
|
7
10
|
const templates_1 = require("../loaders/templates");
|
|
11
|
+
const path_1 = __importDefault(require("path"));
|
|
8
12
|
function createBaseConfig(options) {
|
|
9
13
|
var _a, _b, _c, _d;
|
|
10
14
|
const mode = (_a = options.mode) !== null && _a !== void 0 ? _a : 'development';
|
|
11
15
|
return {
|
|
12
16
|
mode,
|
|
13
|
-
|
|
14
|
-
* IMPORTANT:
|
|
15
|
-
* Disable default webpack entry (./src)
|
|
16
|
-
* because entry is fully controlled by pug-plugin
|
|
17
|
-
*/
|
|
18
|
-
entry: () => ({}),
|
|
17
|
+
context: process.cwd(),
|
|
19
18
|
output: {
|
|
19
|
+
path: path_1.default.join(process.cwd(), 'dist'),
|
|
20
20
|
clean: true,
|
|
21
21
|
},
|
|
22
22
|
module: {
|
|
@@ -5,11 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.templatesLoader = templatesLoader;
|
|
7
7
|
const pug_plugin_1 = __importDefault(require("pug-plugin"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
8
9
|
function templatesLoader(options) {
|
|
9
10
|
var _a;
|
|
10
11
|
return [
|
|
11
12
|
new pug_plugin_1.default({
|
|
12
|
-
entry: (_a = options.entry) !== null && _a !== void 0 ? _a : 'src/views/pages',
|
|
13
|
+
entry: path_1.default.resolve(process.cwd(), (_a = options.entry) !== null && _a !== void 0 ? _a : 'src/views/pages/'),
|
|
14
|
+
loaderOptions: {
|
|
15
|
+
root: path_1.default.resolve(process.cwd(), 'src'),
|
|
16
|
+
},
|
|
13
17
|
filename: ({ chunk }) => {
|
|
14
18
|
let [name] = chunk.name.split('/');
|
|
15
19
|
if (name === 'home')
|