frosty 0.0.68 → 0.0.69

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frosty",
3
- "version": "0.0.68",
3
+ "version": "0.0.69",
4
4
  "main": "dist/index",
5
5
  "module": "dist/index",
6
6
  "types": "dist/index",
@@ -15,8 +15,13 @@
15
15
  "@o2ter/server-js": "^0.0.20",
16
16
  "babel-jest": "^29.7.0",
17
17
  "babel-loader": "^10.0.0",
18
+ "css-loader": "^7.1.2",
18
19
  "dotenv-webpack": "^8.1.1",
20
+ "file-loader": "^6.2.0",
19
21
  "mini-css-extract-plugin": "^2.9.3",
22
+ "postcss-loader": "^8.1.1",
23
+ "sass": "^1.90.0",
24
+ "sass-loader": "^16.0.5",
20
25
  "terser-webpack-plugin": "^5.3.14",
21
26
  "webpack": "^5.98.0",
22
27
  "webpack-cli": "^6.0.1"
@@ -116,9 +116,9 @@ if [ "$NO_BUILD" != "true" ]; then
116
116
  [ -n "$SRCROOT" ] && BUILD_OPTS="$BUILD_OPTS --env SRCROOT="$SRCROOT""
117
117
  [ -n "$PORT" ] && BUILD_OPTS="$BUILD_OPTS --env PORT="$PORT""
118
118
  if [ "$WATCH_MODE" = "true" ]; then
119
- eval npx webpack $BUILD_OPTS --watch &
119
+ npx webpack $BUILD_OPTS --watch &
120
120
  else
121
- eval npx webpack $BUILD_OPTS
121
+ npx webpack $BUILD_OPTS
122
122
  fi
123
123
  fi
124
124
 
@@ -33,6 +33,8 @@ import Dotenv from 'dotenv-webpack';
33
33
  import TerserPlugin from 'terser-webpack-plugin';
34
34
  import MiniCssExtractPlugin from 'mini-css-extract-plugin';
35
35
 
36
+ const { dirname: __dirname } = import.meta;
37
+
36
38
  export default async (env, argv) => {
37
39
 
38
40
  const {
@@ -54,25 +56,25 @@ export default async (env, argv) => {
54
56
 
55
57
  const {
56
58
  SRCROOT = config.src,
57
- OUTPUT_DIR = config.output || path.resolve(import.meta.dirname, 'dist'),
59
+ OUTPUT_DIR = config.output || path.resolve(__dirname, 'dist'),
58
60
  } = env;
59
61
 
60
62
  const frostyDeps = await (async () => {
61
63
  try {
62
64
  const resolved = import.meta.resolve('frosty');
63
65
  return {
64
- frosty: resolved.endsWith('/dist/index.js') ? resolved.replace('/index.js', '') : resolved,
66
+ frosty: path.dirname(resolved.replace('file://', '')),
65
67
  };
66
68
  } catch {
67
- const { rollupConfig: { input } } = await import(path.resolve(import.meta.dirname, '../../rollup.config.mjs'));
69
+ const { rollupConfig: { input } } = await import(path.resolve(__dirname, '../../rollup.config.mjs'));
68
70
  const resolved = {};
69
71
  for (const [k, v] of _.entries(input)) {
70
72
  if (k === 'index') continue;
71
- resolved[`frosty/${k}`] = path.resolve(import.meta.dirname, '../..', v);
73
+ resolved[`frosty/${k}`] = path.resolve(__dirname, '../..', v);
72
74
  }
73
75
  return {
74
76
  ...resolved,
75
- frosty: path.resolve(import.meta.dirname, '../../src/index'),
77
+ frosty: path.resolve(__dirname, '../../src/index'),
76
78
  };
77
79
  }
78
80
  })();
@@ -116,9 +118,9 @@ export default async (env, argv) => {
116
118
  test: /\.(css|sass|scss)$/,
117
119
  use: [
118
120
  !server && MiniCssExtractPlugin.loader,
119
- 'css-loader',
121
+ path.resolve(__dirname, 'node_modules/css-loader'),
120
122
  {
121
- loader: 'postcss-loader',
123
+ loader: path.resolve(__dirname, 'node_modules/postcss-loader'),
122
124
  options: {
123
125
  postcssOptions: {
124
126
  plugins: [
@@ -127,14 +129,14 @@ export default async (env, argv) => {
127
129
  }
128
130
  }
129
131
  },
130
- 'sass-loader',
132
+ path.resolve(__dirname, 'node_modules/sass-loader'),
131
133
  ].filter(Boolean),
132
134
  });
133
135
 
134
136
  const imageLoaderConfiguration = ({ server }) => ({
135
137
  test: /\.(gif|jpe?g|a?png|svg)$/i,
136
138
  use: {
137
- loader: 'file-loader',
139
+ loader: path.resolve(__dirname, 'node_modules/file-loader'),
138
140
  options: {
139
141
  name: '[name].[contenthash].[ext]',
140
142
  publicPath: '/images',
@@ -147,7 +149,7 @@ export default async (env, argv) => {
147
149
  const fontLoaderConfiguration = ({ server }) => ({
148
150
  test: /\.ttf$/i,
149
151
  use: {
150
- loader: 'file-loader',
152
+ loader: path.resolve(__dirname, 'node_modules/file-loader'),
151
153
  options: {
152
154
  name: '[name].[contenthash].[ext]',
153
155
  publicPath: '/fonts',
@@ -205,7 +207,7 @@ export default async (env, argv) => {
205
207
  ...config.options?.plugins ?? [],
206
208
  ];
207
209
 
208
- const server = config.serverEntry ? path.resolve(process.cwd(), config.serverEntry) : path.resolve(import.meta.dirname, './src/server/default.js');
210
+ const server = config.serverEntry ? path.resolve(process.cwd(), config.serverEntry) : path.resolve(__dirname, './src/server/default.js');
209
211
 
210
212
  const random = crypto.randomUUID();
211
213
  const tempDir = fs.mkdtempSync(`${os.tmpdir()}${path.sep}`);
@@ -230,7 +232,7 @@ export default async (env, argv) => {
230
232
  entry: {
231
233
  [`${name}_bundle`]: [
232
234
  'core-js/stable',
233
- path.resolve(import.meta.dirname, './src/client/index.js'),
235
+ path.resolve(__dirname, './src/client/index.js'),
234
236
  ],
235
237
  },
236
238
  output: {
@@ -276,7 +278,7 @@ export default async (env, argv) => {
276
278
  entry: {
277
279
  server: [
278
280
  'core-js/stable',
279
- path.resolve(import.meta.dirname, './src/server/index.js'),
281
+ path.resolve(__dirname, './src/server/index.js'),
280
282
  ],
281
283
  },
282
284
  output: {