Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunWuyuan committed Jan 19, 2025
1 parent f0e9d87 commit 8fc2e7d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/project-fetcher-hoc.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const ProjectFetcherHOC = function (WrappedComponent) {
setProjectId: PropTypes.func
};
ProjectFetcherComponent.defaultProps = {
assetHost: 'https://s4-1.wuyuan.1r.ink/',
assetHost: process.env.ZCASSET,
projectHost: 'https://projects.scratch.mit.edu'
};

Expand Down
2 changes: 1 addition & 1 deletion src/playground/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script src="http://localhost:3000/scratchtool"></script>
<script src="<%= process.env.ZCAPI %>/scratchtool"></script>
<% if (htmlWebpackPlugin.options.enablePWA ) { %>
<!--<meta name="viewport" content="width=device-width, user-scalable=no" />-->
<link rel="manifest" href="manifest.webmanifest">
Expand Down
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ function getPlugins () {
let res = base.plugins.concat([
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"' + process.env.NODE_ENV + '"',
'process.env.ZCAPI': '"' + process.env.ZCAPI + '"',
'process.env.ZCASSET': '"' + process.env.ZCASSET + '"',
'process.env.DEBUG': Boolean(process.env.DEBUG),
'process.env.GA_ID': '"' + (process.env.GA_ID || 'UA-000000-01') + '"'
}),
Expand Down

0 comments on commit 8fc2e7d

Please sign in to comment.