@nlabs/lex 1.55.2 → 1.56.0
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/LexConfig.d.ts +3 -3
- package/lib/LexConfig.js +8 -2
- package/lib/commands/build/build.d.ts +3 -2
- package/lib/commands/build/build.js +2 -2
- package/lib/commands/dev/dev.js +4 -4
- package/lib/commands/publish/publish.js +10 -5
- package/lib/commands/serverless/serverless.js +12 -10
- package/lib/commands/test/test.js +2 -2
- package/lib/commands/versions/versions.d.ts +1 -1
- package/lib/commands/versions/versions.js +2 -2
- package/lib/create/changelog.d.ts +11 -6
- package/lib/create/changelog.js +5 -5
- package/lib/types/modules.d.js +2 -0
- package/lib/utils/app.d.ts +4 -4
- package/lib/utils/app.js +6 -6
- package/lib/utils/postcss/postcss-for.d.ts +9 -1
- package/lib/utils/postcss/postcss-for.js +7 -6
- package/lib/utils/postcss/postcss-percentage.d.ts +3 -2
- package/lib/utils/postcss/postcss-percentage.js +1 -2
- package/lib/utils/webpack/LexSvgSpritemapPlugin.d.ts +20 -0
- package/lib/utils/webpack/LexSvgSpritemapPlugin.js +257 -0
- package/package.json +30 -31
- package/tsconfig.json +1 -0
- package/webpack.config.js +6 -13
package/webpack.config.js
CHANGED
|
@@ -25,7 +25,6 @@ import postcssImport from 'postcss-import';
|
|
|
25
25
|
import postcssNesting from 'postcss-nesting';
|
|
26
26
|
import postcssPresetEnv from 'postcss-preset-env';
|
|
27
27
|
import postcssUrl from 'postcss-url';
|
|
28
|
-
import SVGSpriteMapPlugin from 'svg-spritemap-webpack-plugin';
|
|
29
28
|
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
|
|
30
29
|
import {URL} from 'url';
|
|
31
30
|
import {default as webpack} from 'webpack';
|
|
@@ -35,6 +34,7 @@ import {WebpackPluginServe} from 'webpack-plugin-serve';
|
|
|
35
34
|
|
|
36
35
|
import {LexConfig} from './lib/LexConfig.js';
|
|
37
36
|
import {relativeFilePath, relativeNodePath} from './lib/utils/file.js';
|
|
37
|
+
import LexSvgSpritemapPlugin from './lib/utils/webpack/LexSvgSpritemapPlugin.js';
|
|
38
38
|
import postcssFor from './lib/utils/postcss/postcss-for.js';
|
|
39
39
|
import postcssPercentage from './lib/utils/postcss/postcss-percentage.js';
|
|
40
40
|
import tail from 'lodash/tail.js';
|
|
@@ -175,17 +175,10 @@ const svgPaths = `${sourceFullPath}/icons/**/**.svg`;
|
|
|
175
175
|
|
|
176
176
|
if(globSync(svgPaths, globOptions).length) {
|
|
177
177
|
plugins.push(
|
|
178
|
-
new
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
output: {
|
|
183
|
-
chunk: {keep: true},
|
|
184
|
-
filename: './icons/icons.svg'
|
|
185
|
-
},
|
|
186
|
-
sprite: {
|
|
187
|
-
prefix: false
|
|
188
|
-
}
|
|
178
|
+
new LexSvgSpritemapPlugin(svgPaths, {
|
|
179
|
+
allowDuplicates: false,
|
|
180
|
+
filename: './icons/icons.svg',
|
|
181
|
+
prefix: false
|
|
189
182
|
})
|
|
190
183
|
);
|
|
191
184
|
}
|
|
@@ -952,4 +945,4 @@ export default (webpackEnv, webpackOptions) => {
|
|
|
952
945
|
}
|
|
953
946
|
|
|
954
947
|
return mergedConfig;
|
|
955
|
-
};
|
|
948
|
+
};
|