@ray-js/builder-web 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/build.js CHANGED
@@ -208,15 +208,15 @@ function build(options, context) {
208
208
  ]);
209
209
  const publicDir = path_1.default.join(cwd, 'public');
210
210
  if (fs_extra_1.default.existsSync(publicDir)) {
211
+ config.resolve.modules.prepend('node_modules');
212
+ config.resolve.modules.prepend(publicDir);
211
213
  shared_1.log.info(LOG_PREFIX, 'copy public folder files'.yellow, publicDir.underline.blue);
212
214
  config.plugin('copy').use(copy_webpack_plugin_1.default, [
213
215
  {
214
216
  patterns: [
215
217
  {
216
218
  from: path_1.default.join(cwd, 'public'),
217
- to({ absoluteFilename }) {
218
- return `${path_1.default.relative(publicDir, absoluteFilename)}`;
219
- },
219
+ to: outputPath,
220
220
  },
221
221
  ],
222
222
  },
@@ -10,7 +10,7 @@ const postcss_selector_rename_1 = __importDefault(require("postcss-selector-rena
10
10
  function processCss(config) {
11
11
  ;
12
12
  [
13
- { name: 'less-module', test: /\.module\.css$/, cssModules: true },
13
+ { name: 'css-module', test: /\.module\.css$/, cssModules: true },
14
14
  { name: 'css', test: /\.css$/, cssModules: false, exclude: /\.module\.css$/ },
15
15
  ].forEach(({ test, cssModules, name, exclude }) => {
16
16
  const rule = config.module.rule(name).test(test);
@@ -32,7 +32,7 @@ const _PAGES_ = [
32
32
  `;
33
33
  const render = ejs_1.default.compile(routeTml);
34
34
  const readConfigFromConfigFile = (api) => {
35
- const routesConfigFile = api.searchJSFile('src/routes.config');
35
+ const routesConfigFile = api.searchJSFile(`${api.options.source}/routes.config`);
36
36
  if (!routesConfigFile) {
37
37
  throw new Error(`missing configuration file (routes.config.{ts|js})`);
38
38
  }
@@ -53,7 +53,7 @@ function default_1(source) {
53
53
  return __awaiter(this, void 0, void 0, function* () {
54
54
  const cb = this.async();
55
55
  const { api } = this.getOptions();
56
- const routesConfigFile = api.searchJSFile('src/routes.config');
56
+ const routesConfigFile = api.searchJSFile(`${api.options.source}/routes.config`);
57
57
  if (routesConfigFile === this.resourcePath) {
58
58
  const routes = readConfigFromConfigFile(api);
59
59
  const routeWithConfig = routesAdditionConfig(api, routes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/builder-web",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Ray builder for web",
5
5
  "keywords": [
6
6
  "ray"
@@ -21,9 +21,9 @@
21
21
  "watch": "tsc -p ./tsconfig.build.json --watch"
22
22
  },
23
23
  "dependencies": {
24
- "@ray-js/babel-preset-standard": "^1.3.2",
25
- "@ray-js/shared": "^1.3.2",
26
- "@ray-js/types": "^1.3.2",
24
+ "@ray-js/babel-preset-standard": "^1.3.3",
25
+ "@ray-js/shared": "^1.3.3",
26
+ "@ray-js/types": "^1.3.3",
27
27
  "address": "^1.1.2",
28
28
  "autoprefixer": "9.x",
29
29
  "case-sensitive-paths-webpack-plugin": "^2.4.0",
@@ -58,6 +58,6 @@
58
58
  "email": "tuyafe@tuya.com"
59
59
  }
60
60
  ],
61
- "gitHead": "a6af0026d8770839d9c1209a9e933b23ed77bf4a",
61
+ "gitHead": "78ca2269ac5efb52e102029258aab74c0a700c68",
62
62
  "repository": {}
63
63
  }