Skip to content

Commit

Permalink
Solve #21
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinoli committed Aug 9, 2021
1 parent 5d172c9 commit 6aae1fc
Show file tree
Hide file tree
Showing 3 changed files with 1,559 additions and 1,343 deletions.
11 changes: 8 additions & 3 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,31 @@ export default {

// Build Configuration: https://go.nuxtjs.dev/config-build
build: {
// Transpile yarrrml-parser with Babel
// https://github.com/semantifyit/RocketRML/issues/20#issuecomment-880192637
transpile: ['yarrrml-parser'],
extend(config, { isDev, isClient }) {
config.node = {
fs: 'empty' // to ignore fs
// ignore fs Node.js module (used in yarrrml-parser)
// https://github.com/semantifyit/RocketRML/issues/20#issuecomment-880192637
fs: 'empty'
}
config.module.rules.push(
// for importing/exporting workers as ES modules
{
test: /\.worker\.js$/,
use: { loader: 'worker-loader' }
},
// enable importing yaml file as a string
{
// enable importing yaml file as a string
test: /\.ya?ml$/i,
use: 'raw-loader'
}
)
},
plugins: [
// https://github.com/semantifyit/RocketRML/issues/20#issuecomment-880192637
// to ignore xpath-iterator package, which is a optional packages that uses nodejs c++ addon
// https://github.com/semantifyit/RocketRML/issues/20#issuecomment-880192637
new webpack.IgnorePlugin({
resourceRegExp: /^/u,
contextRegExp: /xpath-iterator/u
Expand Down

0 comments on commit 6aae1fc

Please sign in to comment.