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

Commit e33feb9

Browse files
author
SSen
committed
fix: errors of less-loader, sass-loader
1 parent a1a4d0d commit e33feb9

File tree

20 files changed

+135
-19
lines changed

20 files changed

+135
-19
lines changed

source/.packages.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
tag: latest
44
module: commonjs
55
'@rocket-scripts/*':
6-
version: 1.0.4
6+
version: 1.0.5
77
tag: latest
88
module: commonjs
File renamed without changes.

source/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"rimraf": "^3.0.2",
153153
"rocket-punch": "^2.2.3",
154154
"rxjs": "^6.6.2",
155-
"sass-loader": "^10.0.1",
155+
"sass-loader": "^8.0.2",
156156
"semver": "^7.1.3",
157157
"source-map-support": "^0.5.16",
158158
"stream-buffers": "^3.0.2",

source/src/@rocket-scripts/react-preset/webpackLoaders/getWebpackStyleLoaders.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ export function getWebpackStyleLoaders({
7373
loader: preProcessor,
7474
options: {
7575
sourceMap: true,
76-
...(preProcessor.indexOf('less-loader') > -1
77-
? { javascriptEnabled: true }
78-
: {}),
76+
//...(preProcessor.indexOf('less-loader') > -1
77+
// ? { javascriptEnabled: true }
78+
// : {}),
7979
},
8080
};
8181

source/src/@rocket-scripts/web/__run__/start.run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import puppeteer from 'puppeteer';
66

77
(async () => {
88
const cwd: string = await copyTmpDirectory(
9-
path.join(process.cwd(), 'test/fixtures/web/start'),
9+
path.join(process.cwd(), 'test/fixtures/web/css'),
1010
);
1111

1212
await exec(`npm install`, { cwd });

source/src/@rocket-scripts/web/__tests__/build.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { copyTmpDirectory, createTmpDirectory } from '@ssen/tmp-directory';
44
import path from 'path';
55

66
describe('web/build', () => {
7-
test.each(['start', 'webpack-config'])(
7+
test.each(['start', 'webpack-config', 'css'])(
88
'should build the project "fixtures/web/%s"',
99
async (dir: string) => {
1010
// Arrange : project directories

source/src/@rocket-scripts/web/__tests__/start.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('web/start', () => {
3232
}
3333
});
3434

35-
test.each(['start', 'webpack-config'])(
35+
test.each(['start', 'webpack-config', 'css'])(
3636
'should read h1 text and the text should change with HMR (%s)',
3737
async (dir: string) => {
3838
// Arrange : project directories
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"private": true,
3+
"scripts": {
4+
"app:build": "ts-node scripts/build.ts",
5+
"app:start": "ts-node scripts/start.ts",
6+
"build": "npm run app:build",
7+
"start": "npm run app:start"
8+
},
9+
"dependencies": {
10+
"react": "^16.13.1",
11+
"react-dom": "^16.13.1"
12+
},
13+
"devDependencies": {
14+
"@types/react": "^16.9.34",
15+
"@types/react-dom": "^16.9.6",
16+
"@types/webpack-env": "^1.15.1",
17+
"typescript": "^3.9.5",
18+
"ts-node": "^8.10.2"
19+
}
20+
}
766 Bytes
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"short_name": "App",
3+
"name": "My App",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
}
10+
],
11+
"start_url": ".",
12+
"display": "standalone",
13+
"theme_color": "#000000",
14+
"background_color": "#ffffff"
15+
}

0 commit comments

Comments
 (0)