Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 8ed086a

Browse files
committed
Fix: Use runestone.bundle.js as the top-level output.
1 parent 88fa188 commit 8ed086a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

runestone/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ def build(all, wd):
150150
else:
151151
os.chdir(findProjectRoot())
152152
sys.path.insert(0, os.getcwd())
153-
if not pathlib.Path(resource_filename("runestone", "dist/webpack.bundle.js")).exists():
154-
click.echo("Error -- You are missing webpack.bundle.js. Please make sure")
153+
if not pathlib.Path(resource_filename("runestone", "dist/runestone.bundle.js")).exists():
154+
click.echo("Error -- You are missing runestone.bundle.js. Please make sure")
155155
click.echo("you have Runestone installed correctly.")
156156
click.echo("In a development environment, execute npm run build.")
157157
sys.exit(-1)

webpack.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ module.exports = (env) => {
4040
},
4141
output: {
4242
path: path.resolve(__dirname, "runestone/dist"),
43-
// See https://webpack.js.org/guides/caching/. This provides a hash for dynamic imports as well, avoiding caching out-of-date JS.
44-
filename: '[name].bundle.js?v=[contenthash]',
43+
// See https://webpack.js.org/guides/caching/. This provides a hash for dynamic imports as well, avoiding caching out-of-date JS. Use this function to rename the top-level output to ``runestone.bundle.js`` instead of the default ``webpack.bundle.js``. I can't find any other way to do this (renaming this file, or `webpack.index.js`).
44+
filename: (pathData) => pathData.chunk.name == "webpack" ? "runestone.bundle.js?v=[contenthash]" : "[name].bundle.js?v=[contenthash]",
4545
// Delete everything in the output directory on each build.
4646
clean: true,
4747
},

0 commit comments

Comments
 (0)