Ask a Question
Back to All

How to process css import from npm in spike app

down vote
I'm trying to include purecss from npm into my spike app, which throws the loader error, can someone let me know the way to import css file from npm


import purecss from 'purecss'


{ ModuleParseError: Module parse failed: /Users/loganathans/projects/spike-app/node_modules/purecss/build/pure-min.css Unexpected token (11:76)


const htmlStandards = require('reshape-standard')
const cssStandards = require('spike-css-standards')
const jsStandards = require('spike-js-standards')
const pageId = require('spike-page-id')
const path = require('path')
const env = process.env.NODE_ENV

module.exports = {
devtool: 'source-map',
matchers: { html: '(**/).sgr', css: '(**/).css' },
ignore: ['/layout.sgr', '/_', '**/.', 'readme.md', 'yarn.lock'],
reshape: htmlStandards({
locals: (ctx) => { return { pageId: pageId(ctx), foo: 'bar' } },
minify: env === 'production'

postcss: cssStandards({
parser: false,
path: path.join(__dirname, './assets/css/css_modules'),
minify: env === 'production',
warnForDuplicates: env !== 'production'
babel: jsStandards()