@rws-framework/client 2.13.1 → 2.13.2
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.
|
@@ -24,9 +24,11 @@ interface ViewDecoratorData {
|
|
|
24
24
|
decoratorArgs: any;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export function getRWSVitePlugins({
|
|
27
|
+
export function getRWSVitePlugins({ tsConfigPath, cssOutputPath, dev }: RWSLoaderOptions): PluginOption[] {
|
|
28
28
|
return [
|
|
29
|
-
|
|
29
|
+
scssLoader({dev, scssPlugin: scssPlugin, cssOutputPath}),
|
|
30
|
+
tsLoader({dev, scssPlugin: scssPlugin, tsConfigPath}),
|
|
31
|
+
htmlLoader({dev})
|
|
30
32
|
];
|
|
31
33
|
}
|
|
32
34
|
|
|
@@ -165,7 +165,7 @@ class LoadersHelper {
|
|
|
165
165
|
const codeData = await plugin.compileScssCode(scsscontent, path.dirname(filePath) + '/styles');
|
|
166
166
|
const cssCode = codeData.code;
|
|
167
167
|
|
|
168
|
-
styles = isDev ?
|
|
168
|
+
styles = isDev ? `` : '';
|
|
169
169
|
|
|
170
170
|
if (!templateExists) {
|
|
171
171
|
styles += `import { css } from '@microsoft/fast-element';\n`;
|
|
@@ -189,7 +189,7 @@ class LoadersHelper {
|
|
|
189
189
|
|
|
190
190
|
if (templateExists) {
|
|
191
191
|
const templateContent = fs.readFileSync(templatePath, 'utf-8').replace(/<!--[\s\S]*?-->/g, '');
|
|
192
|
-
htmlFastImports = `import * as T from '@microsoft/fast-element';\
|
|
192
|
+
htmlFastImports = `import * as T from '@microsoft/fast-element';\n`;
|
|
193
193
|
template = `
|
|
194
194
|
//@ts-ignore
|
|
195
195
|
let rwsTemplate: any = T.html\`${templateContent}\`;
|
|
@@ -256,7 +256,6 @@ const loader: IRWSViteLoader<TSLoaderParams> = async (params: TSLoaderParams) =>
|
|
|
256
256
|
if(!stylesPath && fs.existsSync(defaultStylesPath)){
|
|
257
257
|
stylesPath ='styles/layout.scss';
|
|
258
258
|
}
|
|
259
|
-
console.log({stylesPath, templateName, tagName})
|
|
260
259
|
|
|
261
260
|
if (tagName && templateName && stylesPath) {
|
|
262
261
|
const [template, htmlFastImports, templateExists] = await LoadersHelper.getTemplate(
|
|
@@ -275,8 +274,6 @@ const loader: IRWSViteLoader<TSLoaderParams> = async (params: TSLoaderParams) =>
|
|
|
275
274
|
isDev
|
|
276
275
|
);
|
|
277
276
|
|
|
278
|
-
console.log({styles})
|
|
279
|
-
|
|
280
277
|
if (className && decoratorExtract?.replacedDecorator) {
|
|
281
278
|
processedContent = `${template}\n${styles}\n${decoratorExtract.replacedDecorator}`;
|
|
282
279
|
}
|