Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
"access": "public"
},
"scripts": {
"build": "npm run build:res && snowpack build",
"build:res": "rescript build",
"clean": "npm run clean:res",
"clean:res": "rescript clean",
"build": "snowpack build",
Copy link
Contributor

@r17x r17x Apr 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have an issue I founded, when run build command. index.bs.js not found
image

image

Reproduce

yarn clean; yarn build

image

build command not run rescript build.

@jihchi I think @jihci/plugin-rescript is missing async optimize(buildOptions, args){} in plugin.js

Copy link
Owner Author

@jihchi jihchi Apr 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ri7nz , thanks for the comment!

Sorry, this PR and the plug-in are still working in progress, it is an experimental work and this might not be merged if things does not go well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jihchi , thanks for your response.

I know for this situation, I'm just want to help your work  🙌

"clean": "rescript clean",
"start": "snowpack dev",
"test": "web-test-runner \"src/**/__tests__/*.bs.js\""
},
Expand All @@ -43,14 +41,14 @@
"react-dom": "^17.0.2"
},
"devDependencies": {
"@jihchi/plugin-rescript": "^1.0.0",
"@snowpack/plugin-dotenv": "^2.1.0",
"@snowpack/plugin-react-refresh": "^2.4.2",
"@snowpack/plugin-run-script": "^2.3.0",
"@snowpack/web-test-runner-plugin": "^0.2.2",
"@testing-library/react": "^11.2.6",
"@web/test-runner": "^0.12.19",
"chai": "^4.3.4",
"rescript": "^9.1.1",
"snowpack": "^3.3.3"
"snowpack": "~3.0"
}
}
8 changes: 1 addition & 7 deletions snowpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ module.exports = {
plugins: [
'@snowpack/plugin-react-refresh',
'@snowpack/plugin-dotenv',
[
'@snowpack/plugin-run-script',
{
cmd: 'npm run build:res',
watch: '$1 -- -w',
},
],
'@jihchi/plugin-rescript',
],
packageOptions: {
/* ... */
Expand Down