@razerspine/webpack-core 1.0.2 → 1.0.3

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.
@@ -2,7 +2,12 @@ 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
- entry: undefined;
5
+ /**
6
+ * IMPORTANT:
7
+ * Explicit empty entry to prevent webpack default './src'
8
+ * PugPlugin controls entry points
9
+ */
10
+ entry: {};
6
11
  output: {
7
12
  clean: boolean;
8
13
  };
@@ -10,7 +10,12 @@ function createBaseConfig(options) {
10
10
  const mode = (_a = options.mode) !== null && _a !== void 0 ? _a : 'development';
11
11
  return {
12
12
  mode,
13
- entry: undefined,
13
+ /**
14
+ * IMPORTANT:
15
+ * Explicit empty entry to prevent webpack default './src'
16
+ * PugPlugin controls entry points
17
+ */
18
+ entry: {},
14
19
  output: {
15
20
  clean: true,
16
21
  },
@@ -18,17 +23,17 @@ function createBaseConfig(options) {
18
23
  rules: [
19
24
  (0, assets_1.assetsLoader)(),
20
25
  (0, scripts_1.scriptsLoader)(options),
21
- (0, styles_1.stylesLoader)(options)
22
- ]
26
+ (0, styles_1.stylesLoader)(options),
27
+ ],
23
28
  },
24
29
  plugins: [
25
30
  ...(0, templates_1.templatesLoader)({
26
31
  entry: (_b = options.templates) === null || _b === void 0 ? void 0 : _b.entry,
27
- mode: options.mode
28
- })
32
+ mode,
33
+ }),
29
34
  ],
30
35
  resolve: {
31
- extensions: ['.ts', '.tsx', '.js', '.json']
32
- }
36
+ extensions: ['.ts', '.tsx', '.js', '.json'],
37
+ },
33
38
  };
34
39
  }
@@ -9,14 +9,14 @@ function scriptsLoader(env) {
9
9
  use: {
10
10
  loader: 'ts-loader',
11
11
  options: {
12
- transpileOnly: env.mode === 'development'
13
- }
14
- }
12
+ transpileOnly: env.mode === 'development',
13
+ },
14
+ },
15
15
  };
16
16
  }
17
17
  return {
18
18
  test: /\.m?js$/,
19
19
  exclude: /node_modules/,
20
- use: 'babel-loader'
20
+ use: 'babel-loader',
21
21
  };
22
22
  }
@@ -19,13 +19,13 @@ function templatesLoader(options) {
19
19
  js: {
20
20
  filename: options.mode === 'production'
21
21
  ? 'js/[name].[contenthash:8].js'
22
- : 'js/[name].js'
22
+ : 'js/[name].js',
23
23
  },
24
24
  css: {
25
25
  filename: options.mode === 'production'
26
26
  ? 'css/[name].[contenthash:8].css'
27
- : 'css/[name].css'
28
- }
29
- })
27
+ : 'css/[name].css',
28
+ },
29
+ }),
30
30
  ];
31
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razerspine/webpack-core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Core webpack config and loaders for starter templates",
5
5
  "license": "ISC",
6
6
  "author": "Razerspine",