diff --git a/config/rollup.base.js b/config/rollup.base.js index d109298..2b73486 100755 --- a/config/rollup.base.js +++ b/config/rollup.base.js @@ -14,7 +14,6 @@ import eft from 'rollup-plugin-eft' import postcss from 'rollup-plugin-postcss' // Postcss plugins -import postcssModules from 'postcss-modules' import simplevars from 'postcss-simple-vars' import nested from 'postcss-nested' import cssnext from 'postcss-cssnext' @@ -52,8 +51,6 @@ switch (process.env.BUILD_ENV) { } } -const cssExportMap = {} - export default { input, name, @@ -76,21 +73,13 @@ export default { postcss({ plugins: [ simplevars({ variables: colors }), + postcssimport(), nested(), cssnext({ warnForDuplicates: false }), - postcssimport(), - postcssModules({ - getJSON(id, exportTokens) { - cssExportMap[id] = exportTokens - } - }), cssnano() ], - getExport(id) { - return cssExportMap[id] - }, - extract, - combineStyleTags + modules: true, + combineStyleTags: true }), replace({ 'process.env.NODE_ENV': `'${process.env.NODE_ENV || 'development'}'` diff --git a/config/rollup.dev.js b/config/rollup.dev.js index 7884b34..0da17a6 100644 --- a/config/rollup.dev.js +++ b/config/rollup.dev.js @@ -22,7 +22,7 @@ const config = { plugins, watch: { chokidar: true, - include: 'src/' + include: 'src/**' } } diff --git a/config/rollup.prod.js b/config/rollup.prod.js index d993d7a..780bf96 100644 --- a/config/rollup.prod.js +++ b/config/rollup.prod.js @@ -9,17 +9,21 @@ const config = { name, file: `${proPath}/${bundle}.js`, format: 'umd', - sourcemap: true + sourcemap: true, + globals: { + 'ef-core': 'ef' + } }, plugins, - external: ['ef-core'], - globals: { - 'ef-core': 'efCore' - } + external: ['ef-core'] } // Load demo script -if (process.env.BUILD_ENV === 'DEMO') config.input = 'src/demo/loader.js' +if (process.env.BUILD_ENV === 'DEMO') { + config.input = 'src/demo/loader.js' + config.external.push('neonclear') + config.output.globals.neonclear = 'neon' +} delete base.bundle delete base.devPath diff --git a/dist/index.html b/dist/index.html index 84296a8..01409fe 100644 --- a/dist/index.html +++ b/dist/index.html @@ -14,6 +14,7 @@
Javascript is required for this site.
+