Skip to content

Commit afdd102

Browse files
committed
fix(core): transpile webpack config to allow module to work
1 parent 49c3df8 commit afdd102

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Diff for: src/module.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@ import webpackDevMiddleware from "webpack-dev-middleware";
1111
import serveStatic from "serve-static";
1212
import Debug from "debug";
1313

14-
import webpackNetlifyConfig from "../lib/webpack.config.js";
1514
import { loadYAMLFile, toYAML } from "../lib/utils/yaml.js";
1615
import { setConfigPaths } from "../lib/utils/netlify.config.js";
1716
import pkg from "../package.json";
1817

18+
import webpackNetlifyConfig from "./webpack.config.js";
19+
1920
const debug = Debug("nuxt:netlify-cms");
2021

2122
const WEBPACK_CLIENT_COMPILER_NAME = "client";

Diff for: lib/webpack.config.js renamed to src/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import ExtractTextPlugin from "extract-text-webpack-plugin";
1010
export default function webpackNetlifyCmsConfig(name, urlPath, pageTitle) {
1111
const config = {
1212
name,
13-
entry: resolve(__dirname, "entry.js"),
13+
entry: resolve(__dirname, "../lib/entry.js"),
1414
output: {
1515
path: resolve(this.options.buildDir, "dist", urlPath),
1616
filename: "bundle.[chunkhash].js",
@@ -34,7 +34,7 @@ export default function webpackNetlifyCmsConfig(name, urlPath, pageTitle) {
3434
new HTMLPlugin({
3535
title: pageTitle,
3636
filename: "index.html",
37-
template: resolve(__dirname, "template", "index.html"),
37+
template: resolve(__dirname, "../lib/template", "index.html"),
3838
inject: true,
3939
chunksSortMode: "dependency"
4040
})

0 commit comments

Comments
 (0)