Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "remove variables support (#30)" #33

Merged
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
9 changes: 7 additions & 2 deletions src/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export default function webpackConfigFactory(args: any): Configuration {
const themesPath = args.themePath ? path.join(basePath, args.themePath) : path.join(basePath, 'src', 'theme');
const outputPath = path.join(basePath, 'output', 'theme');
const themes: string[] = args.themes;
const themeVariablesFiles = themes.map((theme) => {
return path.join(themesPath, theme, 'variables.css');
});

const postcssPresetConfig = {
browsers: ['last 2 versions', 'ie >= 10'],
Expand All @@ -29,13 +32,15 @@ export default function webpackConfigFactory(args: any): Configuration {
},
autoprefixer: {
grid: true
}
},
importFrom: themeVariablesFiles
};

const emitAll = emitAllFactory({
legacy: true,
inlineSourceMaps: false,
basePath: themesPath
basePath: themesPath,
additionalAssets: themeVariablesFiles
});

const tsLoaderOptions = {
Expand Down